forked from jara001/ng_trajectory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
73 lines (61 loc) · 2.31 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# setup.py
"""Install script for this package."""
import os
from setuptools import setup, find_packages
from _version import Version
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
#def read(fname):
# return open(os.path.join(os.path.dirname(__file__), fname)).read()
VERSION = str(Version(os.popen("git describe --tags --dirty --always").read()[1:-1]))
if os.path.exists("VERSION"):
STORED = open("VERSION", "r").read()
if ".dev" in VERSION:
_len = len(VERSION[:VERSION.index(".dev")+4])
else:
_len = len(VERSION)
if STORED[:_len] == VERSION[:_len] and ".dev" in VERSION:
# Obtain dev number
VERSION = VERSION + str(int(STORED[_len:]) + 1)
else:
if ".dev" in VERSION:
VERSION = VERSION + "0"
else:
if ".dev" in VERSION:
VERSION = VERSION + "0"
with open("VERSION", "w") as file:
file.write(VERSION)
# Also store the version to be seen from the code
with open("./ng_trajectory/version.py", "w") as file:
file.write("__version__ = '%s'" % VERSION)
setup(
name = "ng_trajectory",
version = VERSION,
author = "Jaroslav Klapálek",
author_email = "[email protected]",
description = ("A trajectory generation script using Nevergrad."),
license = "GPLv3",
keywords = "trajectory Nevergrad",
#url = "http://packages.python.org/an_example_pypi_project",
packages=find_packages(),
#long_description=read('README'),
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
],
install_requires=['nevergrad==0.3.0', "scipy>=0.18.0", "numpy>=1.12.0,<1.24", "Pillow>=4.2.0", "tqdm"],
python_requires='>=3.6',
extras_require={
"plot_support": "matplotlib"
},
scripts=['bin/ng_run', 'bin/ng_generate_data', 'bin/ng_help', 'bin/ng_curvature_gui', 'bin/ng_graph', 'bin/ng_plot'],
)