forked from cigroup-ol/windml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
79 lines (64 loc) · 2.54 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
from setuptools import setup, find_packages
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
import uuid
import os
import windml
# disables creation of .DS_Store files inside tarballs on Mac OS X
os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
os.environ['COPYFILE_DISABLE'] = 'true'
rand_uuid = uuid.uuid1()
def extract_package_name(requirement):
return str(requirement.req)
# return str(requirement.req).replace('-', '_').split('==')[0]
def find_requirements(req_file='requirements.txt'):
reqs = [extract_package_name(r) for r in parse_requirements(
req_file, session=rand_uuid)]
np = [pkg for pkg in reqs if pkg.startswith('numpy')]
reqs.remove(np[0])
return reqs
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
DESCRIPTION = """The windML framework provides an easy-to-use access to wind data
sources within the Python world, building upon numpy, scipy, sklearn, and
matplotlib. As a machine learning module, it provides versatile tools for
various learning tasks like time-series prediction, classification, clustering,
dimensionality reduction, and related tasks."""
setup(
author=windml.__author__,
author_email=windml.__author_email__,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: X11 Applications',
'Environment :: X11 Applications :: GTK',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Operating System :: Unix',
'Programming Language :: Python',
'Topic :: Education',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Atmospheric Science',
],
data_files=[],
description=DESCRIPTION,
ext_modules=[],
install_requires=find_requirements('requirements.txt'),
dependency_links=['https://github.com/matplotlib/basemap/archive/v1.0.7rel.tar.gz'],
license=windml.__license__,
long_description=read('README.md'),
name='windml',
packages=find_packages(),
package_data={},
setup_requires=['numpy'],
url=windml.__url__,
version=windml.__version__,
)