python-versioneer / python-versioneer

version-string management for VCS-controlled trees

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python setup can not be located in a sub-directory of a repository

mklein0 opened this issue · comments

The versioneer script does not allow the creation of python modules which are sub-directories of a git repository.

ex:

repo/
   .git
   module1/
       setup.py
       versioneer.py
           module1/
          __init__.py
           stuff.py
    module2/
       setup.py
       versioneer.py
       module2/
           __init__.py
           morestuff.py

While this directory structure may not be a best practice, it can be a useful construct when building rapid prototypes.

I face the same issue as well, having a repository of version-synchronized packages. Consider a javascript and a python flask project developed in the same repository etc.

Would there be any problems related to removing the version checks? It seems that a git based version number could be used any time git describe gives a meaningful output. Does anyone see problems arising when removing the checks from from_vcs.py?

Is this something that is being looked at? We have the same need.

I hit the same issue here. Would be a nice improvement.

Now that 0.15 is out, we should look at fixing this. I'll take a look at #61 and see if I can adapt it to the (large) changes that have landed since then. Thanks!

Would be great if that went into the next release! I love versioneer and use it heavily in dozens of projects, but unfortunately there is one with a nested directory structure :-(

Note that current pip-8.1.1 has a bug/issue that causes pip install . from a sub-directory-based setup.py to fail (it always gets a version of "0+unknown"). pip install -e . and pip wheel should work, though.

If you see other problems with subprojects like this, please open a new bug.. I wouldn't be surprised if there are other corner cases that are broken somehow. And if current master seems to work for you, please chime in here; it could definitely use more real-world testing than what I've been able to do locally.