Skip to content

Commit bbda2c3

Browse files
author
Kirill V. Lyadvinsky
committed
Improve setup.py
1 parent 3582746 commit bbda2c3

File tree

6 files changed

+49
-20
lines changed

6 files changed

+49
-20
lines changed

README.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22
Tools to manipulate ZX Spectrum files
33
=====================================
44

5-
.. image:: https://travis-ci.org/codeatcpp/zxtools.svg?branch=master
5+
.. image:: https://img.shields.io/travis/codeatcpp/zxtools/master.svg?style=flat
66
:target: https://travis-ci.org/codeatcpp/zxtools
77

88
.. image:: https://codecov.io/gh/codeatcpp/zxtools/branch/master/graph/badge.svg
9-
:target: https://codecov.io/gh/codeatcpp/zxtools
9+
:target: https://codecov.io/gh/codeatcpp/zxtools
10+
11+
.. image:: https://img.shields.io/github/release/codeatcpp/zxtools.svg?style=flat
12+
:target: https://github.com/codeatcpp/zxtools/releases
13+
14+
.. image:: https://img.shields.io/pypi/v/zxtools.svg?style=flat
15+
:target: https://pypi.python.org/pypi/zxtools
16+
17+
.. image:: http://img.shields.io/pypi/dm/zxtools.svg?style=flat
18+
:target: https://pypi.python.org/pypi/zxtools
1019

1120
Here's a set of utils to manipulate files that were copied from a TR-DOS diskette or from a tape.
1221

setup.py

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,58 @@
11
#! /usr/bin/env python3
2-
# vim: set fileencoding=utf-8 :
2+
# -*- coding: utf-8 -*-
3+
4+
import re
5+
6+
from os.path import join, dirname
37

48
from setuptools import setup, find_packages
59

10+
with open(join(dirname(__file__), 'zxtools', '__init__.py'), 'r') as f:
11+
version_info = re.match(r".*__version__ = '(.*?)'", f.read(), re.S).group(1)
612

713
with open('README.rst') as f:
8-
readme = f.read()
14+
long_readme = f.read
15+
16+
dev_requires = [
17+
'pytest>=2.8',
18+
'coverage>=3.7.1',
19+
]
920

1021
setup(
1122
name='zxtools',
12-
version='1.0.20',
23+
version=version_info,
1324
description='Tools to manipulate files from ZX Spectrum',
14-
long_description=readme,
25+
keywords='spectrum sinclair 48k z80 zeus zeus-asm',
26+
long_description=long_readme,
1527
author='Kirill V. Lyadvinsky',
1628
author_email='[email protected]',
1729
download_url='https://github.com/codeatcpp/zxtools',
1830
url='http://www.codeatcpp.com',
1931
license='BSD-3-Clause',
2032
packages=find_packages(exclude=('test', 'docs')),
21-
test_suite="test",
33+
extras_require={
34+
'test': dev_requires,
35+
},
36+
test_suite='test',
2237
classifiers=[
23-
'Development Status :: 5 - Production/Stable',
38+
'Development Status :: 4 - Beta',
2439
'Operating System :: OS Independent',
2540
'Environment :: Console',
2641
'Intended Audience :: Developers',
27-
'Programming Language :: Python',
28-
'Programming Language :: Python :: 3 :: Only',
42+
'License :: OSI Approved :: BSD License',
43+
'Programming Language :: Python :: 3',
44+
'Programming Language :: Python :: 3.2',
45+
'Programming Language :: Python :: 3.3',
46+
'Programming Language :: Python :: 3.4',
47+
'Programming Language :: Python :: 3.5',
48+
'Programming Language :: Python :: Implementation :: CPython',
2949
'Topic :: Software Development',
30-
'Topic :: Utilities'
31-
]
50+
'Topic :: Utilities',
51+
],
52+
entry_points={
53+
'console_scripts': [
54+
'zeus2txt = zxtools.zeus2txt:main',
55+
'hobeta = zxtools.hobeta:main',
56+
],
57+
},
3258
)
33-

zxtools/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#! /usr/bin/env python
2-
# vim: set fileencoding=utf-8 :
32
# -*- coding: utf-8 -*-
43
#
54
# Copyright (c) 2016 Kirill V. Lyadvinsky
@@ -9,5 +8,5 @@
98
# See LICENSE file in the project root for full license information.
109
#
1110

12-
CHUNK_SIZE = 512 * 1024 # 512 KBytes
13-
11+
__version__ = '1.0.21'
12+
CHUNK_SIZE = 512 * 1024 # 512 KBytes

zxtools/hobeta.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#! /usr/bin/env python
2-
# vim: set fileencoding=utf-8 :
32
# -*- coding: utf-8 -*-
43
#
54
# Copyright (c) 2016 Kirill V. Lyadvinsky

zxtools/trdos.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#! /usr/bin/env python
2-
# vim: set fileencoding=utf-8 :
32
# -*- coding: utf-8 -*-
43
#
54
# Copyright (c) 2016 Kirill V. Lyadvinsky
@@ -43,4 +42,3 @@
4342
# Sector 8 contains disk information in the following format:
4443
#
4544
#
46-

zxtools/zeus2txt.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#! /usr/bin/env python
2-
# vim: set fileencoding=utf-8 :
32
# -*- coding: utf-8 -*-
43
#
54
# Copyright (c) 2016 Kirill V. Lyadvinsky

0 commit comments

Comments
 (0)