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

release to pypi on windows, linux and macos #2644

Merged
merged 9 commits into from
Jan 31, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
set release python only on push tag
  • Loading branch information
caishanli committed Jan 29, 2021
commit 312aadd54b0530b54c0ef3bec96f02807c1bc7f2
9 changes: 6 additions & 3 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: release-python
on: [push, pull_request]
on:
push:
tags:
- '*'

jobs:
build_sdist:
Expand Down Expand Up @@ -42,7 +45,7 @@ jobs:
- uses: actions/setup-python@v2

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.6.3
run: python -m pip install cibuildwheel

- name: Build wheel
run: python -m cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -78,7 +81,7 @@ jobs:
- uses: actions/setup-python@v2

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==1.6.3
run: python -m pip install cibuildwheel

- uses: ilammy/msvc-dev-cmd@v1

Expand Down
10 changes: 3 additions & 7 deletions python/setup.py.i
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
from setuptools import setup, find_packages

import sys
if sys.version_info < (3,0):
sys.exit("Sorry, Python < 3.0 is not supported")

try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
class bdist_wheel(_bdist_wheel):
Expand Down Expand Up @@ -31,12 +27,12 @@ setup(
description = "ncnn is a high-performance neural network inference framework optimized for the mobile platform",
url = "https://github.com/Tencent/ncnn",
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: C++",
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
],
license="BSD-3",
python_requires = ">=3.5",
license = "BSD-3",
packages = find_packages(),
package_dir = {"": "."},
package_data = {"ncnn": ["ncnn${PYTHON_MODULE_PREFIX}${PYTHON_MODULE_EXTENSION}"]},
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ def build_extension(self, ext):
long_description_content_type="text/markdown",
url="https://github.com/Tencent/ncnn",
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: C++",
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
],
license='BSD-3',
python_requires=">=2.7",
packages=find_packages("python"),
package_dir={"": "python"},
install_requires=requirements,
Expand Down