Skip to content
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

Importing astropy_healpix can generate a warning from setuptools_scm #211

Open
taldcroft opened this issue Dec 15, 2023 · 2 comments
Open

Comments

@taldcroft
Copy link
Member

If the file .git_archival.txt exists in the current directory, then importing astropy_healpix will generate a warning from setuptools_scm. For some reason the .git_archival.txt file is noticed by setuptools_scm in the import process. An example is shown below.

We have many packages using the same setuptools_scm machinery and they do not have this issue. The core astropy is another example, so it seems to be something in the way astropy-healpix is working.

$ conda create -n astropy-healpix python=3.10
$ conda activate astropy-healpix
$ pip install astropy-healpix setuptools_scm

$ mkdir test
$ cd test

$ python -c "import astropy_healpix"

$ touch .git_archival.txt
$ python -c "import astropy_healpix"
/Users/aldcroft/miniconda3/envs/astropy-healpix/lib/python3.10/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output
  warnings.warn("git archive did not support describe output")
@taldcroft taldcroft changed the title Importing astropy_healpix can generate a Warning from setuptools_scm Importing astropy_healpix can generate a warning from setuptools_scm Dec 15, 2023
@lpsinger
Copy link
Contributor

This might be because we haven't fully transitioned away from setup.py in this project yet.

@taldcroft
Copy link
Member Author

In our local packages we use setuptools_scm and setup.py without any issues.

But the point about moving away from setup.py and adopting the machinery for setuptools_scm that is used by astropy itself seems like it should fix this issue and be a good thing anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants