forked from Python3pkg/CGRtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
89 lines (79 loc) · 3.87 KB
/
setup.py
File metadata and controls
89 lines (79 loc) · 3.87 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2014-2021 Ramil Nugmanov <nougmanoff@protonmail.com>
# This file is part of CGRtools.
#
# CGRtools 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 3 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, see <https://www.gnu.org/licenses/>.
#
from distutils.command.sdist import sdist
from distutils.util import get_platform
from importlib.util import find_spec
from pathlib import Path
from setuptools import setup
class _sdist(sdist):
def finalize_options(self):
super().finalize_options()
self.distribution.data_files.append(('lib', ['INCHI/libinchi.so', 'INCHI/libinchi.dll',
'clean2d/dist/clean2d.js']))
cmd_class = {'sdist': _sdist}
if find_spec('wheel'):
from wheel.bdist_wheel import bdist_wheel
class _bdist_wheel(bdist_wheel):
def finalize_options(self):
super().finalize_options()
self.root_is_pure = False
platform = get_platform()
if platform == 'win-amd64':
self.distribution.data_files.append(('lib', ['INCHI/libinchi.dll', 'clean2d/dist/clean2d.js']))
elif platform == 'linux-x86_64':
self.distribution.data_files.append(('lib', ['INCHI/libinchi.so', 'clean2d/dist/clean2d.js']))
else:
self.distribution.data_files.append(('lib', ['clean2d/dist/clean2d.js']))
cmd_class['bdist_wheel'] = _bdist_wheel
setup(
name='CGRtools',
version='4.1.18',
packages=['CGRtools', 'CGRtools.algorithms', 'CGRtools.algorithms.components', 'CGRtools.algorithms.standardize',
'CGRtools.containers', 'CGRtools.files', 'CGRtools.files._mdl', 'CGRtools.periodictable',
'CGRtools.periodictable.element', 'CGRtools.utils', 'CGRtools.attributes'],
url='https://github.com/stsouko/CGRtools',
license='LGPLv3',
author='Dr. Ramil Nugmanov',
author_email='nougmanoff@protonmail.com',
python_requires='>=3.6.1',
cmdclass=cmd_class,
install_requires=['CachedMethods>=0.1.4,<0.2'],
extras_require={'mrv': ['lxml>=4.1'], 'clean2d': ['py-mini-racer>=0.4.0'], 'jit': ['numpy>=1.18', 'numba>=0.50']},
data_files=[],
zip_safe=False,
long_description=(Path(__file__).parent / 'README.rst').read_text(),
classifiers=['Environment :: Plugins',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'],
command_options={'build_sphinx': {'source_dir': ('setup.py', 'doc'),
'build_dir': ('setup.py', 'build/doc'),
'all_files': ('setup.py', True)}}
)