Hi everyone, I have a question. I’m currently work...
# development
g
Hi everyone, I have a question. I’m currently working on a python deployment, and I’m trying to figure out something. Currently our directory structure is like this:
Package/package/__init__.py
Previously, our setup.py would run
setuptools.find_packages()
In order to determine which files to package, and the end result would bring up a package, that, when installed, would show up in site_packages as
package/__init__.py
However, when I run my python_package build in Pants, even if I make it dependent on a build that only exists in the
package
directory, it still contains the full directory structure, and it’s incompatible with our old build system. Does anyone here know how to make the build only contain the internal directory? Do I just have to place the BUILD file in the internal directory only?
e
The key words here in Pants-speak are 'source root'. Give this a look and speak up if it doesn't get you moving: https://www.pantsbuild.org/docs/source-roots
g
Thanks! I ended up putting a source root in the
Package
directory which made it work.