Skip to content

sdist doesn't include wcs header files and scripts directory. #26

Closed

Description

@phn

Hello,

I tried Python 2.6 and Python 2.7. Running python setup.py install in the astropy repo, doesn't create any problems since all the files are accessible. But this is a problem when trying to install this from a sdist, for example by automated testing software like tox.

Bug in setuptools/distutils?

Using recursive-include astropy/wcs/src *.h in MANIFEST.in works.

If MANIFEST.in is specified then only the files mentioned in it gets copied; setuptools/distutils does not use its default file finding algorithm in this case.

Additional comments (with what I think are the reasons):

The scripts directory doesn't get copied, since setup.py removes the only file README.rst in this directory.

The contents of AstroPy.egg-info/ doesn't get cleared/updated between two runs of setup.py. For example, say we run setup.py sdist using the MANIFEST.in mentioned above. Now remove the line from MANIFEST.in, ad run setup.py again. This time the header files will get included, even though they are not specified in MANIFEST.in. I guess that this is because the header files get listed in AstroPy.egg-info/SOURCES.txt the first time, and the list gets reused. This leads to major confusion: I just lost 1.5 hours. Deleting AstroPy.egg-info leads to the previous behaviour.

If AstroPy.egg-info is deleted, without deleting version.py AND version.pyc, then the import astropy line in setup.py complains that AstroPy distribution doesn't exist. The astropy/__init__.py tried to run version.py which uses AstroPy, causing error.

Prasanth

Activity

  1. ghost assigned on Oct 26, 2011
  2. eteq commented on Oct 26, 2011

    @eteq
    Member

    There are still some revisions going on in setup.py and a few other layout places that I'd like to wait to settle down before addressing this... once those are done, I'll update the MANIFEST.in.

    The distribution doesn't exist error should be fixed by @27dcbdc6ef57fdbf6feeac77d14ad3c45642b185, though.

  3. added a commit that references this issue on Nov 1, 2011
    d79e983
  4. added 2 commits that reference this issue on Oct 9, 2013
    9caf376
  5. added a commit that references this issue on May 10, 2014
  6. added a commit that references this issue on Nov 24, 2022
  7. added a commit that references this issue on Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions