-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
94 lines (86 loc) · 3.55 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
import sys
# NOTE: these's a lot of code here that's commented out, and that's
# because it was the start of installing pyIMRPhenomD directly
# from the MLDC repository. The module is, however, installed
# if the MLDC master_install is done, so there's no need for
# this as long as we stay in the docker. I'll leave the code
# in case we change our mind though.
# these classes are required to pass additional arguments through pip
# to this script. Not entirely sure if everything in those classes is
# needed though, we might be able to shave off a few lines via trial
# and error.
#class CustomInstallCommand(install):
# user_options = install.user_options + [('gsl=', None, None),
# ('MLDC=', None, None)]
# def initialize_options(self):
# print('Running InstallCommand.initialize_options')
# install.initialize_options(self)
# self.gsl = None
# self.MLDC = None
#
# def finalize_options(self):
# print('Running InstallCommand.finalize_options')
# install.finalize_options(self)
#
# def run(self):
# print('Running InstallCommand.run')
# install.run(self)
#
#
#class CustomDevelopCommand(develop):
# user_options = develop.user_options + [('gsl=', None, None),
# ('MLDC=', None, None)]
# def initialize_options(self):
# print('Running DevelopCommand.initialize_options')
# develop.initialize_options(self)
# self.gsl = None
# self.MLDC = None
#
# def finalize_options(self):
# print('Running DevelopCommand.finalize_options')
# develop.finalize_options(self)
#
# def run(self):
# print('Running DevelopCommand.run')
# develop.run(self)
# the two extra commands needed for installing the IMRPhenomD
# waveform generator in the MLDC repository. We simply extract them
# from the argv list manually for now, and complain (without failing)
# if they are not found.
#gsl_location = None
#MLDC_location = None
## iterate over a copy, otherwise we would skip elements.
#for arg in sys.argv[:]:
# if arg.startswith('--gsl='):
# gsl_location = arg.split('=', 1)[1]
# sys.argv.remove(arg)
# if arg.startswith('--MLDC='):
# MLDC_location = arg.split('=', 1)[1]
# sys.argv.remove(arg)
# check if the required arguments were given, and skip making the waveform generator
# available if not. We may want to fail if these are not given eventually, but for
# now this seems more reasonable. We'd fail or default to the hdf5 route in the waveform
# generator interface.
#if gsl_location is None:
# print('GSL location not given. IMR waveform generator cannot be installed.')
#if MLDC_location is None:
# print('MLDC location not given. IMR waveform generator cannot be installed.')
#if gsl_location is not None and MLDC_location is not None:
# raise NotImplementedError
# # search / access IMRPD directory
# # build .so
# # copy .so into a local directory or write the required path to some file
# # either import the file directly in the waveform generator interface, or add
# # the path and import from there
setup(name='jannasutils',
version='0.0',
url='https://github.com/Janna112358/jannas-utils.git',
author='Janna112358',
packages=['jannasutils'],
zip_safe=False,
# cmdclass={'install': CustomInstallCommand,
# 'develop': CustomDevelopCommand}
)