-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup.py + MANIFEST.in pulling from files in parent directory #2339
Comments
What you're trying to do, having two packages for one conceptual project, isn't something that's recommended or supported. Most projects have one package and either includes the tests as part of that package or excludes the tests except for source checkouts/distributions. I would recommend following the normative patterns. If you wish to do something very different, I'll have to ask that you delve into the source to find the answers to your questions. After you've spent some time with the code and if you think there's a way to support the layout the way you would expect, consider filing an issue describing your proposed design and what value you think that brings to the project. If it's a compelling story, we can proceed with soliciting an implementation. |
@jaraco well, how to support this and all other possible cases: let |
Generally speaking, you shall support lower level features than higher level "file structures", the latter is a broken approach, whereas the former will allow you to build universal and stable tool. |
If all that's needed is to change the working directory prior to executing import os
import pathlib
import setuptools
os.chdir(pathlib.Path(__file__).parents[1])
setuptools.setup(...) Setuptools is working to move users away from bespoke behavior in the setup script and reliance on the current working directory, so I'm not sure how much I'd recommend that approach, but from your comment, it seems to suggest that might work.
In principle, I agree. Having simple rules that are composed to provide higher level behavior tends to be more reliable and extensible.
I suspect the simple approach you describe exists or did exist at one point in distutils or setuptools, but in an attempt to satisfy a wide variety of use-cases, has developed complexity over time. I'd be open to contributions to simplify the design or implementation, but any change is going to require some research and development. I've got my plate completely full just trying to reconcile Setuptools with distutils and deprecate the installer functionality. If you wish to articulate an idea or issue, feel free to start the discussion in a new issue. Also, feel encouraged to study the source and devise a different design that achieves your goals. |
I have a feature request: supporting pulling from files in the parent directory of
MANIFEST.in
andsetup.py
.Motivation
I have a Python 3.8 package whose unit tests are also package-able. Here is the file structure inside the repo:
The desired behavior I want in both package's
setup.py
+MANIFEST.in
to be able to add something like this:If there are any workaround I am not aware of, an explanation would be appreciated.
Research
Currently, I don't think it's possible to pull from files in the parent directory. This is based on:
README.rst
couldn't be foundThe text was updated successfully, but these errors were encountered: