-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #237 from seung-lab/develop
fix: syntax error in setup.py + modernize
- Loading branch information
Showing
5 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include python/zfpy.pxd | ||
include python/zfpy.pyx | ||
recursive-include include *.h | ||
recursive-include src *.c *.h | ||
include LICENSE | ||
include pyproject.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
"cython", | ||
"oldest-supported-numpy; python_version<'3.9'", | ||
'numpy; python_version>="3.9"', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# cython: language_level=3 | ||
|
||
import cython | ||
cimport libc.stdint as stdint | ||
from libc.stddef cimport ptrdiff_t | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# cython: language_level=3 | ||
|
||
import sys | ||
import operator | ||
import functools | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,48 @@ | ||
from setuptools import setup, Extension | ||
import numpy as np | ||
|
||
class NumpyImport: | ||
def __repr__(self): | ||
import numpy as np | ||
|
||
return np.get_include() | ||
|
||
__fspath__ = __repr__ | ||
|
||
setup( | ||
name="zfpy", | ||
setup_requires=["numpy", "cython"], | ||
version="1.0.1", | ||
author="Peter Lindstrom, Danielle Asher", | ||
author_email="[email protected]", | ||
url="https://zfp.llnl.gov", | ||
license="License :: OSI Approved :: BSD License", | ||
description="zfp compression in Python", | ||
long_description="zfp is a compressed format for representing multidimensional floating-point and integer arrays. zfp provides compressed-array classes that support high throughput read and write random access to individual array elements. zfp also supports serial and parallel compression of whole arrays using both lossless and lossy compression with error tolerances. zfp is primarily written in C and C++ but also includes Python and Fortran bindings.", | ||
ext_modules=[Extension("zfpy", ["build/python/zfpy.c"], | ||
include_dirs=["include", np.get_include()], | ||
libraries=["zfp"], library_dirs=["build/lib64", "build/lib/Release"]), language_level = "3"] | ||
ext_modules=[ | ||
Extension( | ||
"zfpy", | ||
sources=["python/zfpy.pyx"], | ||
include_dirs=["include", str(NumpyImport())], | ||
libraries=["zfp"], | ||
library_dirs=["build/lib64", "build/lib/Release"], | ||
language_level=3, | ||
lanugage="c", | ||
), | ||
], | ||
classifiers=[ | ||
"Intended Audience :: Developers", | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering :: Image Processing", | ||
"Topic :: System :: Archiving :: Compression", | ||
"Operating System :: POSIX", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows :: Windows 10", | ||
], | ||
) |