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

Added python limited API support #595

Merged
merged 1 commit into from Dec 15, 2021

Conversation

asenyaev
Copy link
Contributor

@asenyaev asenyaev commented Dec 15, 2021

  • Added "DPYTHON3_LIMITED_API=ON" flag in setup.py
  • Changed the pattern to save a binary in setup.py
  • Added a proper import version.py in setup.py after moving to python limited API
  • Changed the command to build a package in travis_config.sh
  • Modified workflows for all platforms to build packages on one python version and then to test it on all combinations.

Also PR fixes an issue: #414

@asenyaev asenyaev marked this pull request as ready for review December 15, 2021 13:34
Copy link
Collaborator

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov
Copy link
Collaborator

Cc @alalek

@asenyaev asenyaev self-assigned this Dec 15, 2021
Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Well done 👍

run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
set "CI_BUILD=1" && python -m pip wheel --wheel-dir=%cd%\wheelhouse . --verbose
python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp36 --dist-dir=%cd%\wheelhouse -v
Copy link
Member

Choose a reason for hiding this comment

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

--py-limited-api=cp36
cp36

BTW, OpenCV specifies Python version here.

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.

Investigate and possibly enable PYTHON3_LIMITED_API
3 participants