-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
54 lines (49 loc) · 1.74 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
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# Copyright (C) 2009-2012 Luis C. Pérez Tato
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See https://github.com/lcpt/pyCost or email : [email protected]
#
from setuptools import setup
from distutils.core import sys
from distutils.sysconfig import get_python_lib
myPrefix = sys.prefix
if len (sys.argv) > 2:
i = 0
for o in sys.argv:
if o.startswith ("--prefix"):
if o == "--prefix":
if len (sys.argv) >= i:
myPrefix = sys.argv[i + 1]
sys.argv.remove (prefix)
elif o.startswith ("--prefix=") and len (o[9:]):
myPrefix = o[9:]
sys.argv.remove (o)
i += 1
if not myPrefix and "PREFIX" in os.environ:
myPrefix = os.environ["PREFIX"]
if not myPrefix or not len (myPrefix):
myPrefix = "/usr/local"
pth_to_libs= get_python_lib(1,0,myPrefix)
print(pth_to_libs)
setup(name='structure_distiller',
version='0.1.0',
author='Luis C. Pérez Tato',
packages=['structure_distiller',],
install_requires=[],
data_files=[]
)