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

Packaging and distributing #18

Closed
ixjlyons opened this issue May 30, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@ixjlyons
Copy link
Member

commented May 30, 2019

I was typing this up as a comment in #17 but thought it should go in its own issue.

The ideal option for users would be a wheel so they can just pip install in an empty venv and everything works. Second best would be an sdist so they have to have numpy and cython and a compiler installed first. There isn't really a way to set up the package so numpy/cython are installed automatically in order to build, as far as I know.

There will need to be separate wheels for different platforms, which makes that option a little painful to achieve for us. Azure Pipelines is something we've started using in a project I recently got involved in and it looks pretty great for having all-platform CI in one place. I believe it's pretty straightforward to temporarily store the build artifacts so they can be retrieved and then pushed to PyPI. It can probably also be automated so everything happens for you when you push a tag, but I haven't looked into it.

@ixjlyons

This comment has been minimized.

Copy link
Member Author

commented May 30, 2019

@sixpearls

This comment has been minimized.

Copy link
Collaborator

commented May 31, 2019

It looks like the recommendation may be to distribute the .c file (SO snippet for ensuring the .c file is built when creating executing the sdist command) and don't cythonize the Extensions. I think this resolves the Cython requirement for users.

I think requiring numpy to be installed and the system compiler to be setup before executing pip install for this package is reasonable given who I expect to use this.

We could also ship the pure numpy implementation to skip the build issues. I was kind of tempted to do that anyway so users could switch implementations if desired.

If you were motivated to setup a CI to build wheels that would be great. But in addition to supporting the different platforms, we would need to make sure we support the minor versions of python. Maybe it's not worth the hassle?

@sixpearls

This comment has been minimized.

Copy link
Collaborator

commented Jun 8, 2019

It looks like we could use the Feature feature and/or possibly mark the pure C extension module optional so it is easy to pip install even without a compiler setup on the machine.

Then we can ship with the pure NumPy implementation and provide an API for switching between the C(ython) and NumPy implementations that defaults to the C(ython) version if it is available and the NumPy version if not.

@sixpearls

This comment has been minimized.

Copy link
Collaborator

commented Jun 10, 2019

Okay, I think this is closed by #20 (and #19). This should be pip install-able.

@sixpearls sixpearls closed this Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.