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

Add pyproject.toml to specify Cython as a build requirement #594

Merged
merged 2 commits into from
Jun 5, 2021

Conversation

bgyori
Copy link
Contributor

@bgyori bgyori commented Jun 4, 2021

This PR adds a pyproject.toml to specify build requirements, most importantly Cython. This means that pip install-ing pyjnius will work without Cython having to be pre-installed. I tested this by starting a clean virtualenv and doing pip install git+https://github.com/bgyori/pyjnius.git@pyproject, which produces the following output:

Collecting git+https://github.com/bgyori/pyjnius.git@pyproject
  Cloning https://github.com/bgyori/pyjnius.git (to revision pyproject) to /private/var/folders/q6/0trkzkfd1pxd6v0675wdzb380000gr/T/pip-req-build-yteli8c8
  Running command git clone -q https://github.com/bgyori/pyjnius.git /private/var/folders/q6/0trkzkfd1pxd6v0675wdzb380000gr/T/pip-req-build-yteli8c8
  Running command git checkout -b pyproject --track origin/pyproject
  Switched to a new branch 'pyproject'
  Branch 'pyproject' set up to track remote branch 'pyproject' from 'origin'.
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting cython
  Using cached Cython-0.29.23-cp39-cp39-macosx_10_9_x86_64.whl (1.9 MB)
Collecting six>=1.7.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: pyjnius
  Building wheel for pyjnius (PEP 517) ... done
  Created wheel for pyjnius: filename=pyjnius-1.3.0-cp39-cp39-macosx_10_14_x86_64.whl size=274723 sha256=475241ce07fd2100a478cfad37262c951dec2b07830c5cb536835125403bea84
  Stored in directory: /private/var/folders/q6/0trkzkfd1pxd6v0675wdzb380000gr/T/pip-ephem-wheel-cache-xv3313p8/wheels/8e/90/90/7d7124e211188973f81770a8fcccaf82ebefc0e9b2c92c37bf
Successfully built pyjnius
Installing collected packages: six, cython, pyjnius
Successfully installed cython-0.29.23 pyjnius-1.3.0 six-1.16.0

Copy link
Member

@tshirtman tshirtman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, i though we had it setup somehow in setup.py, but seems not, at least not in the general case. Also seems like it's a good idea to add this file now it's standard.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants