-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
74 lines (52 loc) · 1.63 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
# setup.py
# -*- coding: utf8 -*-
# vim:fileencoding=utf8 ai ts=4 sts=4 et sw=4
"""Setuptools setup.py file for pyntnclick."""
import os
import subprocess
from distutils.command.build import build
from distutils.command.sdist import sdist
from setuptools import setup, find_packages
from pyntnclick import version
try:
import py2exe
except ImportError:
pass
class BuildCommand(build):
def run(self):
if os.path.exists('scripts/install-po.sh'):
subprocess.check_call('scripts/install-po.sh')
build.run(self)
class SDistCommand(sdist):
def run(self):
if os.path.exists('scripts/install-po.sh'):
subprocess.check_call('scripts/install-po.sh')
sdist.run(self)
def readme_contents():
with open('README.md') as f:
return f.read().strip()
setup(
# Metadata
name=version.NAME,
version=version.VERSION_STR,
description=version.DESCRIPTION,
long_description=readme_contents(),
long_description_content_type='text/markdown',
author=version.AUTHOR_NAME,
author_email=version.AUTHOR_EMAIL,
maintainer=version.MAINTAINER_NAME,
maintainer_email=version.MAINTAINER_EMAIL,
url='https://github.com/CTPUG/pyntnclick',
download_url='https://pypi.org/project/pyntnclick/',
license=version.LICENSE,
classifiers=version.CLASSIFIERS,
platforms=version.PLATFORMS,
# Dependencies
install_requires=version.INSTALL_REQUIRES,
packages=find_packages(),
include_package_data=True,
cmdclass={
'build': BuildCommand,
'sdist': SDistCommand,
},
)