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

Build wheels for package on pypi #88

Closed
robo-corg opened this issue Jun 15, 2016 · 22 comments
Closed

Build wheels for package on pypi #88

robo-corg opened this issue Jun 15, 2016 · 22 comments

Comments

@robo-corg
Copy link

It would be helpful if this package had wheels uploaded to pypi. It looks like currently there is only a source tar.gz uploaded.

@graingert
Copy link

graingert commented Sep 13, 2016

@tobgu you'll need to configure Travis with docker to build manylinux wheels

Also appveyor for Windows

edit: github actions now supports windows and linux in the same service!

@acksmaggart
Copy link
Contributor

acksmaggart commented Apr 18, 2019

@tobgu I'm happy to pitch in on this one. Not having a pre-built windows wheel for pyrsistent is preventing us from installing jupyter in our windows environments since they don't typically have the windows SDK installed to compile the extensions and users don't have the permissions to install it themselves.

Let me know how/if you want to get started with this.

@tobgu
Copy link
Owner

tobgu commented Apr 22, 2019

@MaxTaggart Great! I would really like to see this happening. Ideally with wheels for all major targets (Linux, MacOS, windows, 32/64 bit) and ideally built and released automatically by CI on tag.
Perhaps something like this https://github.com/joerick/cibuildwheel could be used to achieve this?

@MaxTaggart Question on the above statement: Do you mean that users cannot install at all or that they cannot install the C-extension? The install is meant to fallback to using the python implementation in case the C-extenstion cannot be built for compatibility with PyPy for example. If this does not work as it should it's probably a separate issue that needs to be worked on.

@acksmaggart
Copy link
Contributor

acksmaggart commented Apr 22, 2019

To your second question, I noticed the fallback code in setup.py after I posted that comment and tried installing pyrsistent on its own in one of our environments, but it still failed with the same error, unfortunately. This was the error, just for the record:

...
running build_ext
building 'pvectorc' extension
error: [WinError 3] The system cannot find the path specified: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\PlatformSDK\lib

So I think you might be right that this is a separate issue. And maybe there are nuances to the installation process that I just don't understand that would allow me to install it without the windows developer tools on the machine. But barring that possibility, I think making wheels available is probably the next best option.

To your first question, cibuildwheel looks pretty promising. Honestly, I have never used Appveyor, but I am familiar with the Azure Devops CI pipelines which seem very similar. I just started poking around with Appveyor last week. I will do a little more reading about cibuildwheel and Appveyor to get a handle on how we can start to wire it up.

@acksmaggart
Copy link
Contributor

acksmaggart commented Apr 23, 2019

@tobgu It looks like you already have tests running using Tox and Travis. Are you comfortable building the wheels as a separate step that gets kicked off manually after seeing that the Tox tests were successfull (once a tag is pushed like you said)? Or do want the tests to run again, on appveyor's machines for example, as another gate before the wheels are built?

@tobgu
Copy link
Owner

tobgu commented Apr 23, 2019

I'm fine with the build being kicked off after successful run on Travis. Should there, in the future, turn out that Windows-specific issues are identified that were not caught by the existing test we should consider additional testing on Appveyor. For now, lets keep it as simple as possible!

@AlexC84
Copy link

AlexC84 commented Apr 24, 2019

To your second question, I noticed the fallback code in setup.py after I posted that comment and tried installing pyrsistent on its own in one of our environments, but it still failed with the same error, unfortunately. This was the error, just for the record:

...
running build_ext
building 'pvectorc' extension
error: [WinError 3] The system cannot find the path specified: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\PlatformSDK\lib

So I think you might be right that this is a separate issue. And maybe there are nuances to the installation process that I just don't understand that would allow me to install it without the windows developer tools on the machine. But barring that possibility, I think making wheels available is probably the next best option.

this stopped me from installing Jupyter on Windows with Python37-64 today. I used to have VS2015 installed but I uninstalled it a while back. What do i need to install for this to work?

@tobgu
Copy link
Owner

tobgu commented Apr 24, 2019

The immediate issue of not being able to install on some windows platform because fallback to native python implementation fails should be possible to resolve by adding a catch of FileNotFoundError to https://github.com/tobgu/pyrsistent/blob/master/setup.py#L39 and https://github.com/tobgu/pyrsistent/blob/master/setup.py#L47.

If someone, that has the problem, would be able to verify that this helps I'd be happy to incorporate the fix ASAP.

@acksmaggart
Copy link
Contributor

@tobgu So I forked the repo and set up a build using Appveyor. The wheels for 3.5 and up are working great, but the wheels for versions 3.4 and lower are throwing compiler errors and are building without the extension. I'm assuming this is unexpected behaivor, but I just wanted to check before I spent time debugging it.

@acksmaggart
Copy link
Contributor

Also, I just confirmed that adding FileNotFoundError to the exception list will fix the installation problems. I submitted a pull request (#162) with the fix, which references an issue (#161) describing the problem. It felt a little like overkill, but I figure it's better to be thorough.

@tobgu
Copy link
Owner

tobgu commented Apr 25, 2019

Ah, sorry, saw your comment here after reading the new issue. Please see my comment in the PR.

Regarding Python 3.4, please don't spend time on trouble shooting it. Python 3.4 reached end of life 2019-03-19 (https://devguide.python.org/#status-of-python-branches). If you want to you can update setup.py and README.md to reflect that 3.4 is no longer officially supported.

Do you know if it works with Python 2.7?

@tobgu
Copy link
Owner

tobgu commented Apr 25, 2019

Regarding the above. I'll take care of stating that 3.4 is no longer supported. I'll cut a new release tonight with that information and your other PR included. Thanks!

@acksmaggart
Copy link
Contributor

Regarding Python 3.4, please don't spend time on trouble shooting it. Python 3.4 reached end of life 2019-03-19 (https://devguide.python.org/#status-of-python-branches).

Sounds good, I'll remove the CI builds for 3.x versions lower than 3.5. As far as 2.7 goes, it does build using the fallback to pure python. I haven't tried actually installing the package in a 2.7 venv, though. I figured it would make sense to keep supporting 2.7 until the official end of life in 2020, or whenever it is, but let me know if you want to cut that out too.

Regarding the above. I'll take care of stating that 3.4 is no longer supported. I'll cut a new release tonight with that information and your other PR included.

Sounds good.

@tobgu
Copy link
Owner

tobgu commented Apr 25, 2019

Yeah, I would like to continue to support 2.7 until EOL unless it becomes to burdensome.

@graingert
Copy link

@tobgu you'll need to configure Travis with docker to build manylinux wheels

Also appveyor for Windows

github supports windows and linux out the box now

@groodt
Copy link

groodt commented Dec 14, 2019

I'd also love to see wheels for this? Anything I can do to help make this happen?

As far as I understand, there are no more blockers supporting Python 3.5+? All that we are waiting for is Python 2.7 EOL in 17 days? https://pythonclock.org/

@ClimenteA
Copy link

I'm having issues installing jupyter notebook on an embeded python version.

A wheel whould be helpful :)

 ERROR: Command errored out with exit status 1:
     command: 'd:\projects\python-3.8.1-embed-amd64\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aclimente\\AppData\\Local\\Temp\\pip-install-gq8wwi6_\\pyrsistent\\setup.py'"'"'; __file__='"'"'C:\\Users\\aclimente\\AppData\\Local\\Temp\\pip-install-gq8wwi6_\\pyrsistent\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\aclimente\AppData\Local\Temp\pip-install-gq8wwi6_\pyrsistent\pip-egg-info'
         cwd: C:\Users\aclimente\AppData\Local\Temp\pip-install-gq8wwi6_\pyrsistent\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\aclimente\AppData\Local\Temp\pip-install-gq8wwi6_\pyrsistent\setup.py", line 10, in <module>
        from _pyrsistent_version import __version__
    ModuleNotFoundError: No module named '_pyrsistent_version'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@heitorlessa
Copy link

Same issue here while installing jsonschema as a dependency.

@graingert
Copy link

@heitorlessa

Same issue here while installing jsonschema as a dependency.

jsonschema provides a single universal wheel, so that should be impossible.
Can you try installing jsonschema in isolation and then if that fails posting the full failing install log on a new issue on the https://github.com/Julian/jsonschema/issues issue tracker

@heitorlessa
Copy link

I have since moved to fastjsonschema as it doesn't depend on pyrsistent. The issue came from a tool that builds python packages (aws-sam-cli), and it fails because of pyrsistent not having wheels for mac[1] not jsonschema as it does have an universal wheel as you mentioned -- Building in CI and Linux work just fine.

[1]

Final missing wheels: {pyrsistent==0.16.0(sdist)}

@tobgu
Copy link
Owner

tobgu commented Oct 4, 2020

See comments in #196 for how to move forwards with this.

@tobgu
Copy link
Owner

tobgu commented Oct 4, 2020

Closing this in favor for #196 now.

@tobgu tobgu closed this as completed Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants