-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
executable file
·60 lines (55 loc) · 1.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
#!/usr/bin/env python3
import os
from setuptools import setup
import shutil
# 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()
if not os.path.exists('build'):
os.mkdir('build')
scripts = (
'cphugin.py',
'clean.sh',
'dopt.py',
'feature.py',
'hugin.py',
'iopt.py',
'merger.py',
'move.sh',
'pto.py',
'reopt.py',
'stitch.py',
'ts.py',
)
scripts_dist = []
for script in scripts:
# Make script names more executable like
dst_base = script
dst_base = dst_base.replace('.py', '')
dst_base = dst_base.replace('.sh', '')
dst_base = dst_base.replace('_', '-')
dst = 'build/xy-' + dst_base
if os.path.exists(dst):
os.unlink(dst)
os.symlink(os.path.realpath(script), dst)
scripts_dist.append(dst)
setup(
name="xystitch",
version="1.1.0",
author="John McMaster",
author_email='JohnDMcMaster@gmail.com',
description=("Microscope panorama stitching utilities."),
license="BSD",
keywords="hugin panotools microscope",
url='https://github.com/JohnDMcMaster/xystitch',
packages=["xystitch", "xystitch.pto", "xystitch.image"],
scripts=scripts_dist,
install_requires=[],
long_description="xystitch go vroom",
classifiers=[
"License :: OSI Approved :: BSD License",
],
)