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

Working pip install from setup.py #234

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ Regardless of the settings below, |libzfp| will always be built.
GNU make default: off and ignored.


On systems with rpath (e.g. linux), it is also possible to
install the python bindings *after* installing the C
library (e.g. to /prefix_of_zfp/lib/libzfp.so)
by setting rpath during pip install:

LDFLAGS=-Wl,-rpath,/prefix_of_zfp/lib' pip install .


.. c:macro:: BUILD_ZFORP

Build |libzforp| for Fortran bindings to the C API. Requires Fortran
Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# pyproject.toml
[build-system]
requires = ["setuptools", "cython", "numpy"]
build-backend = "setuptools.build_meta"

[project]
name="zfpy"
version="1.0.1"
authors = [ {name="Peter Lindstrom", email="[email protected]"},
{name="Danielle Asher"} ]
description="zfp compression in Python"
requires-python = ">=3.0"
11 changes: 3 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
import numpy as np

setup(
name="zfpy",
version="1.0.1",
author="Peter Lindstrom, Danielle Asher",
author_email="[email protected]",
url="https://zfp.llnl.gov",
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"],
#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", ["python/zfpy.pyx"],
include_dirs=["include", np.get_include()],
libraries=["zfp"], library_dirs=["build/lib64", "build/lib/Release"]), language_level = "3"]
Copy link
Member

Choose a reason for hiding this comment

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

I believe older versions of Visual Studio use build/lib/Release as opposed to just build/lib. For example, see AppVeyor output for a recent commit: https://open.cdash.org/viewBuildError.php?type=1&buildid=10034583. Not sure if we need to preserve this.

libraries=["zfp"], library_dirs=["build/lib64", "build/lib"])],
)