-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Release as Python 3 source wheel on PyPI? #217
Comments
The following comment is related to the title of this issue, but it is not related to the last two posts. ThankI'd like to thank all the contributors of the projects for providing an working open source solution that work reliably. OpenQuakeThis package is currently used by the OpenQuake Engine https://github.com/gem/oq-engine . The OpenQuake project is used to analyze earthquakes around the world for scientific purposes. Recently, the project updated all of it's dependency except The As a reminder, Python 3pyshp==1.2.3 (22nd June 2015)
PYTHON3 = sys.version_info[0] == 3
[...]
def is_string(v):
if PYTHON3:
return isinstance(v, str)
else:
return isinstance(v, basestring) pyshp== 2.1.3 (14th Jan 2021) latest releaseThe latest version of the package does not seem to support python3 conventions
def is_string(v):
return isinstance(v, basestring) Python does not support
https://docs.python.org/3/whatsnew/3.0.html Note that other keywords are not valid any more in python3 such as
HelpWould it be possible to release a version of this @GeospatialPython @karimbahgat , you are the two main contributors on the project, would you be able to give some insight ? |
@deeplook or @micahcochran i'm in the process of releasing a new version, which i'll be doing for the first time using github actions. There i added i made the build command "python -m build --sdist --wheel --outdir dist/" in an ubuntu python3 environment (https://github.com/GeospatialPython/pyshp/blob/master/.github/workflows/deploy.yml). I'm not sure if this is sufficient to build and upload a wheel to pypi, but if you want micropip support in the next version i'll gladly take any suggestions or PRs. |
@alexandreCameron i would definitely suggest an upgrade from v1.2.3 to 2.1.3, as there have been plenty of bug fixes, performance improvements, and new features. However, the python 2 artifacts you are referring to (unicode, basestring, etc) are inside an if-clause that only gets triggered if the version is python 2. As indicated in the project readme, pyshp continues to support and run smoothly for both python 2.7 and 3+, backed up by doctests and unittest. So if you're having problems when upgrading to a later version, i suspect the errors are rather due to backwards incompatible changes after the major version bump to v2. I'm adding more details in the openquake issue thread you referenced. |
I haven't make GitHub workflows do deployment. Over the past few years PyPA have been changing the way to build and upload projects, to "pip". Twine is pretty easy to use. If you are still trying to support Python 2.7 with wheels, you may have to use an older syntax. (Once, I had to look up the older syntax for PyPA's documentation to support Python 3.5/3.6. I used an archive.org version of the website to see what the manual's instructions said a couple years ago.) |
@micahcochran I think the Github workflow I've setup already uses twine in the background, and I believe it should produce a wheel and upload it, but just wanted to see if any of you had any more direct experience with it. For the purpose of the wheels, which would only be relevant for the purpose of pyodide/micropip as described by the OP, I think avoiding the complexity and only supporting Python 3 wheels would be sufficient. |
@deeplook v2.2.0 is now out on pypi with a source wheel ('pyshp-2.2.0-py3-none-any.whl'). Does this fix the issue for pyodide/jupyterlite/micropip? |
It seems one could install
pyshp
on Pyodide and hence JupyterLite using micropip if it would have a source wheel package on PyPI. Maybe worth a thought?The text was updated successfully, but these errors were encountered: