Fixes Broken setup.py

This commit is contained in:
2022-12-07 02:38:17 -03:00
parent f7ac112420
commit a5cd253f0b
5 changed files with 62 additions and 5 deletions

View File

@@ -37,6 +37,15 @@ jobs:
- name: Build Pip Packge - name: Build Pip Packge
run: | run: |
pipenv run VERSION_SUFIX=${GITHUB_RUN_ID} python setup.py sdist bdist_wheel pipenv run VERSION_SUFIX=${GITHUB_RUN_ID} python setup.py sdist bdist_wheel
- name: Convert Pip Packge To ManyLinux
run: |
wget https://github.com/NixOS/patchelf/releases/download/0.17.0/patchelf-0.17.0.tar.gz
tar xf patchelf-0.17.0.tar.gz
cd patchelf-0.17.0
./configure
sudo make install
cd ..
pipenv run python -m auditwheel repair --plat manylinux_2_17_x86_64 dist/yoshi_seals-*.whl
- name: Upload Pip Packge - name: Upload Pip Packge
run: | run: |
pipenv run TWINE_USERNAME=${{secrets.PYPI_USER}} TWINE_PASSWORD=${{secrets.PYPI_TOKEN}} python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/* pipenv run TWINE_USERNAME=${{secrets.PYPI_USER}} TWINE_PASSWORD=${{secrets.PYPI_TOKEN}} python -m twine upload --repository-url https://upload.pypi.org/legacy/ wheelhouse/*

4
.gitignore vendored
View File

@@ -10,3 +10,7 @@ yoshi_seals.egg-info/
.secret .secret
.env .env
dist/
wheelhouse/

View File

@@ -8,6 +8,7 @@ numpy = "*"
pandas = "*" pandas = "*"
cython = "*" cython = "*"
twine = "*" twine = "*"
auditwheel = "*"
[dev-packages] [dev-packages]
coverage = "*" coverage = "*"

23
Pipfile.lock generated
View File

@@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "fc308261dbd2ed96009268de9d5157a44ce179a63137a99a3f76f7980b065eb5" "sha256": "70c04ebd85722a2f7600eb782204874a2d213d53ec0a036dc0c7020c275e1683"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
@@ -16,6 +16,14 @@
] ]
}, },
"default": { "default": {
"auditwheel": {
"hashes": [
"sha256:1da1af54de5badd10149250c257a799be003fd976794716f17914e3d4b4a9fc9",
"sha256:d0be87b5b6fb767eacf1ea4afa3292574cb0f4473a3c0ba55bc9dff1d0b5a333"
],
"index": "pypi",
"version": "==5.3.0"
},
"bleach": { "bleach": {
"hashes": [ "hashes": [
"sha256:085f7f33c15bd408dd9b17a4ad77c577db66d76203e5984b1bd59baeee948b2a", "sha256:085f7f33c15bd408dd9b17a4ad77c577db66d76203e5984b1bd59baeee948b2a",
@@ -26,11 +34,11 @@
}, },
"certifi": { "certifi": {
"hashes": [ "hashes": [
"sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14", "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3",
"sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382" "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"
], ],
"markers": "python_version >= '3.6'", "markers": "python_version >= '3.6'",
"version": "==2022.9.24" "version": "==2022.12.7"
}, },
"cffi": { "cffi": {
"hashes": [ "hashes": [
@@ -332,6 +340,13 @@
], ],
"version": "==2.21" "version": "==2.21"
}, },
"pyelftools": {
"hashes": [
"sha256:519f38cf412f073b2d7393aa4682b0190fa901f7c3fa0bff2b82d537690c7fc1",
"sha256:ec761596aafa16e282a31de188737e5485552469ac63b60cfcccf22263fd24ff"
],
"version": "==0.29"
},
"pygments": { "pygments": {
"hashes": [ "hashes": [
"sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1", "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1",

View File

@@ -1,6 +1,10 @@
from setuptools import Extension, setup
from Cython.Build import cythonize
import setuptools import setuptools
import numpy
import os import os
__name = "yoshi-seals" __name = "yoshi-seals"
__version_sufix = os.environ.get('VERSION_SUFIX') __version_sufix = os.environ.get('VERSION_SUFIX')
@@ -12,6 +16,28 @@ __version = f"2.0.{__version_sufix}"
with open("README.md", "r") as fh: with open("README.md", "r") as fh:
long_description = fh.read() long_description = fh.read()
ext_modules = [
Extension(
"yoshi_seals.shared.array",
[
"yoshi_seals/shared/array.pyx",
],
extra_compile_args=["-O3", "-fopenmp"],
extra_link_args=['-fopenmp'],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
),
Extension(
"yoshi_seals.process.process",
[
"yoshi_seals/process/process.pyx",
],
extra_compile_args=["-O3", "-fopenmp"],
extra_link_args=['-fopenmp'],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
),
]
setuptools.setup( setuptools.setup(
name=__name, name=__name,
version=__version, version=__version,
@@ -22,6 +48,8 @@ setuptools.setup(
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
url="https://github.com/HideyoshiNakazone/Seals-NumericCalculus.git", url="https://github.com/HideyoshiNakazone/Seals-NumericCalculus.git",
packages=setuptools.find_packages(), packages=setuptools.find_packages(),
ext_modules=cythonize(ext_modules),
include_dirs=[numpy.get_include()],
classifiers=[ classifiers=[
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",