hohlraum / gdsCAD

A simple but powerful Python package for creating photolithography masks in the GDSII format.
GNU General Public License v3.0
88 stars 52 forks source link

No module named git_version #2

Closed mabl closed 10 years ago

mabl commented 10 years ago

The current setup.py uses a module called git_version. Which does not exist, at least on the the computers I tried.

-> % pip install --upgrade gdsCAD
Downloading/unpacking gdsCAD from https://pypi.python.org/packages/source/g/gdsCAD/gdsCAD-0.3.2.tar.gz#md5=45b2ce5f686c54cc6eac07df1f81eac8
  Downloading gdsCAD-0.3.2.tar.gz (447kB): 447kB downloaded
  Running setup.py egg_info for package gdsCAD
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/mnt/lin_hdd/home/mabl/Studium/Masterarbeit/PycharmProjects/devenv/build/gdsCAD/setup.py", line 9, in <module>
        from git_version import get_git_version
    ImportError: No module named git_version
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/mnt/lin_hdd/home/mabl/Studium/Masterarbeit/PycharmProjects/devenv/build/gdsCAD/setup.py", line 9, in <module>

    from git_version import get_git_version

ImportError: No module named git_version

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /mnt/lin_hdd/home/mabl/Studium/Masterarbeit/PycharmProjects/devenv/build/gdsCAD
Storing complete log in /home/mabl/.pip/pip.log
mabl commented 10 years ago

Thanks for the fix!

Just before you do another release: Probably you will also need to fix package_data in setup.py, right?

mabl commented 10 years ago

Also, just to make sure: What about RELEASE-VERSION?

hohlraum commented 10 years ago

I added the new version maintenance scripts in an attempt to automate the version numbering. Clearly, I didn't think it through well enough. Thanks for catching the problems. I think things should be working better now. What's wrong with package_data?

For future reference here's how the version updating scheme is meant to work: 1) Make revisions. Commit and tag with the updated version number. 2) Package a source distribution with setup.py sdist. This gets the tag value from git describe --tags, uses it as the version number, then stores it in the file gdsCAD/_version.py 3) Most users will install the package from pip or easy_install or via setup.py install. In these cases there will be no git repo to grab the tag version from, so the version number will be taken from the file gdsCAD/_version.py. 4) When imported the version returned by gdsCAD.__version__ will be that taken from _version.py

If you see any further problems please let me know.

hohlraum commented 10 years ago

OK. I see the package_data problem. I'm on it.

hohlraum commented 10 years ago

MANIFEST.in lists the (non python) files to copy for the distribution package. But it does not (despite documentation to the contrary) include those files when it installs the package, even when include_package_data=True. To do that I had to revert to using the original package_data dict in setup.py.

All should be well now.