-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
56 lines (52 loc) · 1.84 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from subprocess import CalledProcessError, check_output
from setuptools import setup, find_packages
# Add versioning; it's PEP386 compatible with:
# <major>.<minor>.<timestamp_as_micro>-<git_version>
version_path = os.path.join(os.path.dirname(__file__), 'osso', '.version')
try:
# sdist gets to save the version.
version = check_output([
'git', 'log', '-1', '--pretty=format:0.9+%ct.%h']).decode()
except (CalledProcessError, FileNotFoundError):
# install gets to look it up.
try:
with open(version_path) as f:
version = f.read().strip()
except FileNotFoundError:
version = '0.9' # Fallback for source tar downloads.
else:
with open(version_path, 'w') as f:
f.write('%s\n' % (version,))
setup(
# In need of a better name.
name='osso-djuty',
version=version,
packages=find_packages(include=['osso', 'osso.*']),
include_package_data=True,
# Descriptions.
description='OSSO-Djuty Django utility lib',
long_description=('Various useful tools, partly used for development '
'with Django and partly useful without.'),
author='OSSO B.V.',
author_email='[email protected]',
url='https://github.com/ossobv/osso-djuty',
# license='Unknown',
# platforms=('linux',),
# classifiers=[
# 'Development Status :: 4 - Beta',
# 'Intended Audience :: Developers',
# ('License :: OSI Approved :: GNU General Public License v3 or later '
# '(GPLv3+)'),
# 'Operating System :: MacOS :: MacOS X',
# 'Operating System :: POSIX :: Linux',
# 'Programming Language :: Python :: 3',
# 'Topic :: Software Development :: Libraries',
# ],
install_requires=[
'pyl10n>=1.1',
],
)
# vim: set ts=8 sw=4 sts=4 et ai tw=79: