krober10nd / SeismicMesh

2D/3D serial and parallel triangular mesh generation tool for finite element methods.
https://seismicmesh.readthedocs.io/
GNU General Public License v3.0
123 stars 32 forks source link

Python 3.9 #201

Closed nschloe closed 3 years ago

nschloe commented 3 years ago

Instead of the Python version checks at the beginning of setup.py, you'll want to restrict the version range here:

    python_requires=">=3.0",

(There's no need to have this is both setup.py and setup.cfg by the way.) Otherwise, with Python 3.9, it's kicking you into

Defaulting to user installation because normal site-packages is not writeable
Collecting SeismicMesh
  Downloading SeismicMesh-3.4.0.tar.gz (25.0 MB)
     |████████████████████████████████| 25.0 MB 6.0 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpoajvmh3t
       cwd: /tmp/pip-install-q_xywnev/seismicmesh_61e0b753b6cd461fb971f54f3dfdfce0
  Complete output (1 lines):
  Python 3.9.0 or higher is not yet supported, please use an older Python version.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/87/4f/bec8947e60eb79390edd2326a30d19bb27e3f46850b0e83a3624c8e36c39/SeismicMesh-3.4.0.tar.gz#sha256=3e7c78c381e19c7ce9e5c61396f89c75764a15ef18597687783658c3c36183db (from https://pypi.org/simple/seismicmesh/) (requires-python:>=3.0). Command errored out with exit status 1: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpoajvmh3t Check the logs for full command output.
  Using cached SeismicMesh-3.3.0.tar.gz (25.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpgcv2w24z
       cwd: /tmp/pip-install-q_xywnev/seismicmesh_07a6441c6c0f438994cba7b3ea02a3cb
  Complete output (1 lines):
  Python 3.9.0 or higher is not yet supported, please use an older Python version.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a3/61/6cd3022f6be9f6a275f61a0c44213d46f698df8bfcdb8aa4f47a12550955/SeismicMesh-3.3.0.tar.gz#sha256=957ca361f2c680dc7a0c397651a6a74781df046a61cc23ca3146d120d0d9201f (from https://pypi.org/simple/seismicmesh/) (requires-python:>=3.0). Command errored out with exit status 1: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpgcv2w24z Check the logs for full command output.
  Using cached SeismicMesh-3.2.0.tar.gz (25.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp4s_kijes
       cwd: /tmp/pip-install-q_xywnev/seismicmesh_90567446c38a458dadf48627127d3575
  Complete output (1 lines):
  Python 3.9.0 or higher is not yet supported, please use an older Python version.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/49/0c/6d2ae4de2f453c03c878bffe7bfe82c6bb5146661eeb6e96637bfe7298ae/SeismicMesh-3.2.0.tar.gz#sha256=13db9735b93ba533ad7f57a198adc697e934cbab4be24e1a673745add0f86d96 (from https://pypi.org/simple/seismicmesh/) (requires-python:>=3.0). Command errored out with exit status 1: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp4s_kijes Check the logs for full command output.
  Using cached SeismicMesh-3.1.7.tar.gz (24.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpwotuehyf
       cwd: /tmp/pip-install-q_xywnev/seismicmesh_446daf465c124b7594e5f40a292ec5f4
  Complete output (1 lines):
  Python 3.9.0 or higher is not yet supported, please use an older Python version.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/85/11/7fdedf51c6400058eea07ca3bdae24b0604076a4bcce2dcbb9e2ac3f2285/SeismicMesh-3.1.7.tar.gz#sha256=682fd1aedbce678e74e7768c8364b419456ac117a92a6e89baede6eae94d8a87 (from https://pypi.org/simple/seismicmesh/) (requires-python:>=3.0). Command errored out with exit status 1: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpwotuehyf Check the logs for full command output.
  Using cached SeismicMesh-3.1.6.tar.gz (24.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpia18jd27
       cwd: /tmp/pip-install-q_xywnev/seismicmesh_4ece860a4ae748bf8a66ca4692095977
  Complete output (1 lines):
  Python 3.9.0 or higher is not yet supported, please use an older Python version.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/6a/7d/8e987918d5663c032cf499cc6c31b8259080739cfe8e916e3efc8cab5a95/SeismicMesh-3.1.6.tar.gz#sha256=ce806aa65f2047bc39881f9764e1ab1d9ed608afbd04b0d000133741aa8700b2 (from https://pypi.org/simple/seismicmesh/) (requires-python:>=3.0). Command errored out with exit status 1: /usr/bin/python3 /home/nschloe/.local/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpia18jd27 Check the logs for full command output.
  Using cached SeismicMesh-3.1.5.tar.gz (24.9 MB)
  Installing build dependencies ... \^canceled
ERROR: Operation cancelled by user

Also, please support Python 3.9. :smile:

krober10nd commented 3 years ago

Okay, I will try to take a stab at this. Last time I tried back in November, the package segyio was not supporting it. But maybe things have hopefully changed.

In general SeismicMesh needs to be split into a sizing function thing and a mesh generation thing. No need for segyio in the mesh generation side of the package.

nschloe commented 3 years ago

the package segyio was not supporting it.

It works now I think. (At least it installs fine on my machine.) If your own code works with Python 3.9 and your dependencies don't, there's not need to restrict your python_requires. pip will pick up on the missing dependency itself and yield the correct error message.

nschloe commented 3 years ago

In general SeismicMesh needs to be split into a sizing function thing and a mesh generation thing. No need for segyio in the mesh generation side of the package.

Make it an optional dependency and put all the import segyio lines into the functions. This will make the rest of sm work without it.

krober10nd commented 3 years ago

I'm building the wheels for pypi. will upload shortly

krober10nd commented 3 years ago

woah this is strange. When I run my make upload routine, I build the wheel but then I end up with this:

    assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp37', 'cp37m', 'macosx_11_0_x86_64')
make: *** [upload] Error 1

I recently updated my mac to Big Sur.

krober10nd commented 3 years ago

anyway, the sdist is up there on pip for 3.5.0. I'll work on the wheels for the next version.