This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
64 lines (53 loc) · 1.85 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
# -*- coding: utf-8 -*-
import os
import re
import sys
import shlex
import subprocess
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages # NOQA
base_path = os.path.dirname(__file__)
# version
meta_file = os.path.join(base_path, 'tipi/__init__.py')
meta_file_contents = open(meta_file).read()
meta = dict(re.findall(r'__([^_]+)__ = \'([^\']*)\'', meta_file_contents))
# release a version, publish to GitHub and PyPI
if sys.argv[-1] == 'publish':
command = lambda cmd: subprocess.check_call(shlex.split(cmd))
command('git tag v' + meta['version'])
command('git push --tags origin master:master')
command('python setup.py sdist upload')
sys.exit()
setup(
name=meta['title'],
version=meta['version'],
description='Typographic replacements in HTML',
long_description=open('README.rst').read(),
author=meta['author'],
author_email='[email protected]',
url='https://github.com/honzajavorek/tipi',
license=open('LICENSE').read(),
packages=find_packages(exclude=['tests']),
include_package_data=True,
install_requires=['lxml'],
zip_safe=False,
classifiers=(
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Topic :: Utilities',
'Topic :: Text Processing',
'Topic :: Text Processing :: Markup :: HTML',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
)
)