Commit 3596678d authored by Philipp Trunschke's avatar Philipp Trunschke

add setup.py

parent 2f7a313e
Pipeline #1943 failed with stages
in 11 minutes and 44 seconds
......@@ -3,6 +3,7 @@ __pycache__
*.sw[pon]
*.np[yz]
*.xrs
*.so
lapacke
build
doc/html
......
......@@ -224,7 +224,14 @@ build/libxerus.so: $(MINIMAL_DEPS) $(XERUS_SOURCES) $(XERUS_INCLUDES) build/libx
python2: build/python2/xerus.so
python3: build/python3/xerus.so
python3: xerus/xerus.so xerus/libxerus.so xerus/libxerus_misc.so
xerus/xerus.so: build/python3/xerus.so
cp $< $@
xerus/libxerus.so: build/libxerus.so
cp $< $@
xerus/libxerus_misc.so: build/libxerus_misc.so
cp $< $@
build/python2/xerus.so: $(MINIMAL_DEPS) $(PYTHON_SOURCES) src/xerus/python/misc.h build/libxerus.so
@:$(call check_defined, PYTHON2_CONFIG, include and link paths)
......
......@@ -28,10 +28,14 @@ Test whether everything works correctly with
build (and optionally install) the library with
> make all -j4
> sudo make install
and you should be ready to use the library. For more details see <a href="https://www.libxerus.org/building_xerus/">the "Building Xerus" page in the documentation</a>.
and you should be ready to use the library.
To install the python bindings run
> make python3
> pip install .
For more details see <a href="https://www.libxerus.org/building_xerus/">the "Building Xerus" page in the documentation</a>.
# Issues #
......
......@@ -4,18 +4,22 @@ with open("README.md", "r") as f:
long_description = f.read()
setuptools.setup(
name="Xerus",
name="xerus",
version="4.0",
author_email="contact@libxerus.org",
description="A general purpose tensor library",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://libxerus.org",
packages=['xerus'],
package_data={'xerus': ['*.so']},
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Operating System :: POSIX :: Linux",
],
install_requires = [
"numpy",
],
python_requires='==3.5.*',
)
import os
DIR = os.path.dirname(os.path.realpath(__file__))
import ctypes; ctypes.cdll.LoadLibrary(os.path.join(DIR, "libxerus_misc.so"))
import ctypes; ctypes.cdll.LoadLibrary(os.path.join(DIR, "libxerus.so"))
from xerus.xerus import *
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment