-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
55 lines (52 loc) · 1.73 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Setup and install the archive interface with hpss."""
import sys
from os.path import isfile
from os import path
from setuptools.extension import Extension
from setuptools import setup, find_packages
HPSS = Extension(
"pacifica.archiveinterface.backends.hpss._hpssExtensions",
sources=["pacifica/archiveinterface/backends/hpss/hpssExtensions.c"],
include_dirs=["/opt/hpss/include", "/usr/include/tirpc/"],
library_dirs=["/opt/hpss/lib"],
libraries=["tirpc", "hpsscs", "hpss"],
extra_compile_args=["-DLINUX", "-DHPSS51", "-DLITTLEEND"],
)
EXT_MODULES = []
if "--with-hpss" in sys.argv:
EXT_MODULES.append(HPSS)
sys.argv.remove("--with-hpss")
elif isfile("/opt/hpss/include/hpss_api.h"):
EXT_MODULES.append(HPSS)
if "--without-hpss" in sys.argv:
EXT_MODULES = []
sys.argv.remove("--without-hpss")
setup(
name="pacifica-archiveinterface",
use_scm_version=True,
setup_requires=["setuptools_scm"],
description="Pacifica Archive Interface",
url="https://github.com/pacifica/pacifica-archiveinterface/",
long_description=open(
path.join(path.abspath(path.dirname(__file__)), "README.md")
).read(),
long_description_content_type="text/markdown",
author="David Brown",
author_email="david.brown@pnnl.gov",
packages=find_packages(include="pacifica.*"),
namespace_packages=["pacifica"],
entry_points={
"console_scripts": [
"pacifica-archiveinterface=pacifica.archiveinterface.__main__:main",
"pacifica-archiveinterface-cmd=pacifica.archiveinterface.__main__:cmd",
],
},
install_requires=[
"cherrypy",
"peewee>2",
"PyMySQL",
],
ext_modules=EXT_MODULES,
)