What's a tidy way to save all my workflow python packages for later, such that they all have their own setup.py file?

61 Views Asked by At

Python package directories seem overly cumbersome to me, I can't just have 1 self contained folder that is the package, if I want to distribute or locally install a suite of my packages.

If I read the documentation correctly, not only does each package folder need a second wrapper directory in order to be distributable, the official python docs actually recommend a third directory in between your setup.py file and your package directory.

So it looks like this:

my_packages/
  pkg1_wrapper/
    setup.py
    src/
      pkg1/
        main.py
        ...

  pkg2_wrapper/
    setup.py
    src/
      pkg2/
        main.py
        ...
  ...

Which seems really cumbersome compared to what it feels should be possible, something like this:

my_packages/
  pkg1/
    main.py
    ...
  pkg2/
    main.py
    ...
  ...

Do I have this right, or am I missing something?

0

There are 0 best solutions below