-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
39 lines (32 loc) · 887 Bytes
/
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
import os
import sys
import subprocess
from setuptools import setup, find_packages
from setuptools.command.build_py import build_py
# here = os.path.abspath(os.path.dirname(__file__))
def build_extensions():
subprocess.run(
"make clean; make python",
shell = True,
check = True,
)
def make_cmd_class(base):
class CmdClass(base):
def run(self):
build_extensions()
super().run()
return CmdClass
setup(
name = 'glafic',
version = '2.1.10',
author = 'Masamune Oguri',
description = 'Library for gravitational lensing analyses',
url = 'https://github.com/oguri/glafic2',
packages = find_packages(where = 'python'),
package_dir = {'': 'python'},
python_requires = '>=3',
package_data = {'glafic': ['*.so']},
cmdclass = {
'build_py': make_cmd_class(build_py)
},
)