Repository navigation
Closed
Description
Description
When trying to test install our package, which depends on astropy using this github actions workflow, installation of astropy (and no other package) bombs. (We've had no problem installing on our desktop.)
Relevant lines from the workflow config linked above:
- name: Build package
run: |
python setup.py install
Note the dependency on astropy here.
Wonder what I am doing wrong (if anything). Thanks for the package - guidance much appreciated.
Expected behavior
astropy dependency should be smoothly installed just like other packages.
Actual behavior
astropy installation bombs.
Full logs are here. Most relevant snippet below:
Installed /opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/extension_helpers-0.1-py3.6.egg
Searching for astropy
Reading https://pypi.org/simple/astropy/
Downloading https://files.pythonhosted.org/packages/ab/a9/778dc3236dcb85334dbd9fa6832a354fdeede76def0215ae29dd4ab284a3/astropy-4.1rc2.tar.gz#sha256=162b2e222d05523c67fab95fc34fbef881c9271ee01b171efa1b895eaaa28adb
Best match: astropy 4.1rc2
Processing astropy-4.1rc2.tar.gz
Writing /tmp/easy_install-nrw21auq/astropy-4.1rc2/setup.cfg
Running astropy-4.1rc2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nrw21auq/astropy-4.1rc2/egg-dist-tmp-gnbsrj3r
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-nrw21auq/astropy-4.1rc2/setup.py", line 102, in <module>
# need to place data files outside of your packages. See:
ModuleNotFoundError: No module named 'extension_helpers'
System Details
Summarized in the below lines:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]
# python-version: [3.5, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
Activity
[-]Downstream install failing[/-][+]Downstream cloud install failing[/+]pllim commentedon Sep 21, 2020
extension_helpersis needed if somehow your job is trying to buildastropyfrom source, but why?astropyhas wheels for Python 3.6 at https://pypi.org/project/astropy/#files . Maybe @astrofrog , @eteq , or @Cadair have ideas?pllim commentedon Sep 21, 2020
Thanks for opening the issue with extra details!
Cadair commentedon Sep 21, 2020
I think the root of this issue is that you should be running
python -m pip install .rather thanpython setup.py install. I am not 100% sure on why runningpython setup.py installdoesn't install the wheels though.Cadair commentedon Sep 21, 2020
My best guess would be that the ubuntu image doesn't have the
wheelpackage installed by default and therefore setuptools can't use wheels when installing.pllim commentedon Sep 21, 2020
@Cadair , are you saying that downstream packages need to move to using
pyproject.tomltoo if they depend onastropy?vvasuki commentedon Sep 21, 2020
Pre-Installing the latest version off github with the below:
worked!
See "Install dependencies" and "Build test" steps in https://github.com/sanskrit-coders/jyotisha/runs/1144269434?check_suite_focus=true , relevant excerpts below:
vvasuki commentedon Sep 21, 2020
This worked as well! ( https://github.com/sanskrit-coders/jyotisha/runs/1144353354?check_suite_focus=true ) Thanks very much for the quick guidance!
(Leaving this open in case you'd like to discuss/ solve this part.)
[-]Downstream cloud install failing[/-][+]Downstream cloud install failing (setup.py install does not install astropy wheel)[/+]Cadair commentedon Sep 22, 2020
No, but it's not recommended to install package by invoking
setup.pyany more. The correct way to do it is always pip. Even if your package doesn't use PEP 517/8 then one you depend on might and you need pip to successfully install them...To my mind this is a non-question, it doesn't work but you shouldn't really be using it. We should make sure that nowhere in our docs we are recommending anyone use
setup.py xxxto install or otherwise though.pllim commentedon Sep 22, 2020
I opened #10756 to address #10752 (comment) . But given that @vvasuki has found a working solution, I agree that there is no much point in pursuing the remaining question. Thank you, all!