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

@@ -1,6 +1,10 @@
from setuptools import Extension, setup
from Cython.Build import cythonize
import setuptools
import numpy
import os
__name = "yoshi-seals"
__version_sufix = os.environ.get('VERSION_SUFIX')
@@ -12,6 +16,28 @@ __version = f"2.0.{__version_sufix}"
with open("README.md", "r") as fh:
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(
name=__name,
version=__version,
@@ -22,6 +48,8 @@ setuptools.setup(
long_description_content_type="text/markdown",
url="https://github.com/HideyoshiNakazone/Seals-NumericCalculus.git",
packages=setuptools.find_packages(),
ext_modules=cythonize(ext_modules),
include_dirs=[numpy.get_include()],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",