-
Notifications
You must be signed in to change notification settings - Fork 152
Add support for locating setup.py below the git repo root #61
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
Conversation
…ry below the git root directory The other tests are back to passing, and the new test is failing for what appears to be a reasonable reason.
…hierarchy two levels
…rt for sub directory projects 1) I'm removing the creation of the "false-repo" in the test parent directory. I'm not sure what the reasoning behind this was, and based on the behavior I'm trying to add, this directory should be used to infer version if present. 2) Git add paths for SC were incorrect when the project files were placed in a sub-directory.
…g for a .git directory This means that the python module may be located in a sub-directory instead of the git root directory, and versioneer will still be able to find the version.
Add support for project in subdir
# up two directory levels for an appropriately named parent directory | ||
rootdirs = [] | ||
|
||
for i in range(3): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a special reason for the limitation to 3 parent directories? What if I have a deeper nested structure?
I just tried it with my project setup and it worked for One thing that did not work is the retrieval of the version when using the development version, e.g. when I just run For me this isn't a blocker, but perhaps there is an easy solution to make this work even in development mode? |
I've rebased this branch and added some fixups (in "61-subprojects"). It's not entirely working for me yet: |
So, I now understand why
I don't know how to fix this. @dstufft says they want to make I'll add tests to the 61-subprojects branch to exercise the failing cases. |
pypa/pip#3176 might be the pip PR that could fix this |
I've added the extra tests to 61-subprojects. As expected, At this point, I think we're either waiting on a fix in pip, or we accept the test failures (mark them as TODO or something) and put a note in the docs that says you can't use "pip install ." from such a project. Unfortunately I think pip-install is the main use case for this, so I don't know if it's worth landing until that's fixed. On the other hand, all forms of install from a subproject tree are broken in versioneer-0.16, so maybe it's a step forward even though it's not exactly useful yet. |
Ok, I've marked the relevant tests as "expected to fail", and I've added a section to the README about the limitations (basically that |
This addresses issue #38.
versioneer is the best way that I've come across to manage automated versioning of python projects. I know it isn't the standard practice, but I do have a case where I have a python module that is part of a larger project that lives within a single repo, and I wanted to be able to use versioneer for this as well.
This does a few things:
demoapp
, but the setup.py and other files are created indemoapp/project
.git
directory