-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
102 lines (74 loc) · 2.97 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# License: 3 Clause BSD
# Part of Carpyncho - http://carpyncho.jbcabral.org
#==============================================================================
# DOCS
#==============================================================================
"""This file is for distribute carpyncho pytff
"""
# =============================================================================
# IMPORTS
# =============================================================================
import sys
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
#==============================================================================
# CONSTANTS
#==============================================================================
VERSION = ('0', '8')
STR_VERSION = ".".join(VERSION)
REQUIREMENTS = ["numpy>=1.9", "sh>=1.11", "six==1.9"]
DESCRIPTION = "Wrapper arround G. Kovacs & G. Kupi Template Fourier Fitting"
#==============================================================================
# FUNCTIONS
#==============================================================================
def do_publish():
import sh
import six
msg = "version {}".format(STR_VERSION)
six.print_(sh.git.commit(a=True, m=msg))
six.print_(sh.git.tag(a=STR_VERSION, m=msg))
six.print_(sh.git.push("origin", "master"))
six.print_(sh.git.push("origin", "master", tags=True))
six.print_(sh.python("setup.py", "sdist", "upload"))
msg = "Published version {}".format(STR_VERSION)
six.print_(msg)
def do_setup():
setup(
name="pytff",
version=STR_VERSION,
description=DESCRIPTION,
author="Juan BC",
author_email="jbc.develop@gmail.com",
url="https://github.com/carpyncho/pytff",
license="3 Clause BSD",
keywords="tff fourier template match",
package_data={"pytff.datasets": ['dataset/*/*.*']},
include_package_data=True,
classifiers=(
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Astronomy",
),
packages=[pkg for pkg in find_packages() if pkg.startswith("pytff")],
py_modules=["ez_setup"],
install_requires=REQUIREMENTS,
)
if __name__ == "__main__":
if sys.argv[-1] == 'publish':
do_publish()
else:
do_setup()