-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathsetup.py
More file actions
110 lines (92 loc) · 4.42 KB
/
setup.py
File metadata and controls
110 lines (92 loc) · 4.42 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
## Setup version using setuptools to let autoinstallation with
## easy_install or pip install correctly treat the data files
## This setup.py has been adapted from the one shipped with django.
## It requires MANIFEST.in.
## building source distro : python setup.py sdist
## building windows distro: python setup.py bdist_wininst
## building rpm distro : python setup.py bdist_rpm
## building egg distro : python setup.py bdist_egg
## install source distro : python setup.py install
## For custom installation folder use: --home=/where/i/want
from setuptools import setup
import os
import sys
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
# edit 26 May 2022: made a new variable rel_dir
rel_dir = os.path.relpath(root_dir)
len_root_dir = len(rel_dir)
biskit_dir = os.path.join(rel_dir, 'biskit')
doc_dir = os.path.join(rel_dir, 'doc')
script_dir = os.path.join(rel_dir, 'scripts')
for dirpath, dirnames, filenames in os.walk(biskit_dir):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.') or dirname.startswith('__'):
del dirnames[i]
if '__init__.py' in filenames:
package = dirpath[len_root_dir:].lstrip('/').replace('/', '.')
packages.append(package)
else:
data_files.extend([os.path.join(dirpath, f) for f in filenames])
## ## docs and scripts are moved from the root of the project into
## ## the package folder. That's why the separate treatment.
## ## First item in the data_files entry is the target folder, second item
## ## is the relative path in the svn project.
## for dirpath, dirnames, filenames in os.walk( doc_dir ):
## # Ignore dirnames that start with '.'
## for i, dirname in enumerate(dirnames):
## if dirname.startswith('.') or dirname.startswith('__'):
## del dirnames[i]
## data_files.append([os.path.join( 'biskit', dirpath ),
## [os.path.join(dirpath, f) for f in filenames]])
## for dirpath, dirnames, filenames in os.walk( script_dir ):
## # Ignore dirnames that start with '.'
## for i, dirname in enumerate(dirnames):
## if dirname.startswith('.') or dirname.startswith('__'):
## del dirnames[i]
## data_files.append([os.path.join( 'biskit', dirpath ),
## [os.path.join(dirpath, f) for f in filenames]])
# Small hack for working with bdist_wininst.
# See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
if len(sys.argv) > 1 and sys.argv[1] == 'bdist_wininst':
for file_info in data_files:
file_info[0] = '/PURELIB/%s' % file_info[0]
long_description = \
"""Biskit is a modular, object-oriented Python library for structural
bioinformatics research. It facilitates the manipulation and analysis
of macromolecular structures, protein complexes, and molecular
dynamics trajectories. For efficient number crunching, Biskit objects
tightly integrate with numpy. Biskit also offers a platform for the
integration of external programs and new algorithms into complex
workflows. Calculations are thus often delegated to established
programs like Xplor-NIH, Amber, Delphi, T-Coffee, TMAlign, Reduce and
Modeller."""
setup(
name = "biskit",
version = "3.0.1",
url = 'https://github.com/graik/biskit',
download_url= 'https://github.com/graik/biskit/archive/refs/tags/v3.0.0.tar.gz',
author = 'Raik Gruenberg, Johan Leckner and others',
author_email = 'raik.gruenberg@crg.es',
description = 'A Python platform for structural bioinformatics',
long_description = long_description,
provides=['biskit'],
install_requires=['numpy', 'scipy', 'parmed'],
packages = packages,
package_data = {'biskit':data_files,},
include_package_data = True,
scripts = ['scripts/bis.py'],
classifiers= ['License :: OSI Approved :: GNU General Public License (GPL)',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Physics',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Intended Audience :: Science/Research',
'Development Status :: 5 - Production/Stable'
]
)