brandon-rhodes / pyephem

Scientific-grade astronomy routines for Python
Other
757 stars 120 forks source link

Python 3.11 release? #254

Closed lmmentel closed 1 year ago

lmmentel commented 1 year ago

Hey, any chance you could release a version with python 3.11 wheels?

brandon-rhodes commented 1 year ago

@lmmentel — Okay, I've upgraded to a more recent cibuildwheel and re-run the release build — can you try again and see if you find a Python 3.11 wheel for your platform?

lmmentel commented 1 year ago

Wow, this is a blazingly fast response, thanks 🙌 I just checked pypi https://pypi.org/project/ephem/ and the latest release is still 4.1.4. Should I be looking someplace else for the wheels?

brandon-rhodes commented 1 year ago

Click on "Download files": https://pypi.org/project/ephem/#files

lmmentel commented 1 year ago

😅 I got fooled by the release date being Dec 2022. Didn't know you could update release artifacts on pypi like that. It works for me now, thanks! This shaves some weight from my docker image, not having to carry compilers around.

brandon-rhodes commented 1 year ago

I'm glad it works!

The release was successful because it didn't try to change any existing artifacts, but merely tried to add some new wheels. If I wanted to revise the old wheels, then a new release would definitely have been necessary!

dnrohr commented 1 year ago

Hi Brandon — There may still be an issue. I just got this output from running %pip install pyephem from Jupyter on my ipad.

Defaulting to user installation because normal site-packages is not writeable Collecting pyephem Downloading pyephem-9.99.tar.gz (1.4 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting ephem (from pyephem) Downloading ephem-4.1.4.tar.gz (1.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 5.7 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Building wheels for collected packages: pyephem, ephem Building wheel for pyephem (setup.py): started Building wheel for pyephem (setup.py): finished with status 'done' Created wheel for pyephem: filename=pyephem-9.99-py3-none-any.whl size=1550 sha256=9ef24a3f8be2fa16101dedb08750f3559a48cc2611c563136643916425eca336 Stored in directory: /private/var/mobile/Containers/Data/Application/04A35545-5B23-40BE-9AE0-53809909DB7E/Library/Caches/pip/wheels/b6/92/a8/e9fa6252a6d7094b4dd0e55e1982b203d0b12ede18c420756a Building wheel for ephem (setup.py): started Building wheel for ephem (setup.py): finished with status 'error'

error: subprocess-exited-with-error

Running setup.py clean for ephem

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [77 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.macosx-13.1-arm64-cpython-311 creating build/lib.macosx-13.1-arm64-cpython-311/ephem copying ephem/init.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem copying ephem/stars.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem copying ephem/cities.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem creating build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_usno_equinoxes.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_stars.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_cities.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_dates.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_launchpad_244811.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/init.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_observers.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_rise_set.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_launchpad_236872.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_jpl.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_locales.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_rst.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_github_issues.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_usno.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_bodies.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_constants.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_satellite.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests copying ephem/tests/test_angles.py -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests creating build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/angle.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/index.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/tutorial.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/examples.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/coordinates.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/CHANGELOG.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/toc.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/quick.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/rise-set.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/date.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/radec.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/newton.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc copying ephem/doc/catalogs.rst -> build/lib.macosx-13.1-arm64-cpython-311/ephem/doc creating build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/phobos.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/europa.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/uranus.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/jupiter.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/hyperion.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/oberon.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/mars.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/saturn.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl copying ephem/tests/jpl/neptune.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/jpl creating build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/apptopo_deneb.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/astrom_mercury.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/appgeo_deneb.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/apptopo_moon.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/risettran_rigel.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/risettran_moon.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/astrom_neptune.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/riset_sun.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/apptopo_sun.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/appgeo_moon.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/appgeo_jupiter.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/astrom_antares.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/moon_phases.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/riset_moon.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno copying ephem/tests/usno/appgeo_sun.txt -> build/lib.macosx-13.1-arm64-cpython-311/ephem/tests/usno running build_ext building 'ephem._libastro' extension creating build/temp.macosx-13.1-arm64-cpython-311 creating build/temp.macosx-13.1-arm64-cpython-311/extensions creating build/temp.macosx-13.1-arm64-cpython-311/extensions/data creating build/temp.macosx-13.1-arm64-cpython-311/libastro clang -Wsign-compare -Wunreachable-code -DNDEBUG -O3 -Wall -miphoneos-version-min=14.0 -I/Users/holzschu/src/Xcode_iPad/Carnets/cpython/Frameworks_iphoneos/include -Ilibastro -I. -I/Users/holzschu/src/Xcode_iPad/Carnets/cpython/Library/include/python3.11 -c extensions/_libastro.c -o build/temp.macosx-13.1-arm64-cpython-311/extensions/_libastro.o -ffloat-store clang: command not found error: command 'clang' failed with exit code 127 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ephem

Successfully built pyephem Failed to build ephem

ERROR: Could not build wheels for ephem, which is required to install pyproject.toml-based projects

Note: you may need to restart the kernel to use updated packages.

brandon-rhodes commented 1 year ago

@dnrohr — I have never tried installing software on an iPad, but from your error messages, I'm guessing it uses a different processor than a desktop Mac? It looks like the Python 3.11 wheel for macOS targets an Intel processor:

https://pypi.org/project/ephem/#files

ephem-4.1.4-cp311-cp311-macosx_10_9_x86_64.whl (1.4 MB view hashes)
Uploaded Apr 7, 2023 cp311

On the other hand, it looks like my sgp4 library does include arm64, so it must be possible:

https://pypi.org/project/sgp4/#files


sgp4-2.22-cp311-cp311-macosx_11_0_arm64.whl (158.3 kB view hashes)
Uploaded Apr 27, 2023 cp311

sgp4-2.22-cp311-cp311-macosx_10_9_x86_64.whl (159.8 kB view hashes)
Uploaded Apr 27, 2023 cp311

sgp4-2.22-cp311-cp311-macosx_10_9_universal2.whl (183.9 kB view hashes)

So it looks like there's a need to edit, or maybe even rewrite, ephem's .github/workflows/ files to target more Mac architectures, maybe based on how sgp4 does it. I'm not sure I'll have time soon to tackle the project, though.

But so that we don't forget, feel free to open an issue here if you'd like, asking for arm64.