Skip to content

Commit 672863e

Browse files
Danielle Madeleykoterpillar
authored andcommitted
Define version in setup.py to not break install
1 parent b775f97 commit 672863e

File tree

4 files changed

+36
-31
lines changed

4 files changed

+36
-31
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ License
5252
=======
5353

5454
Aloe - Cucumber runner for Python based on Lettuce and Nose
55+
5556
Copyright (C) <2015> Alexey Kotlyarov <a@koterpillar.com>
57+
5658
Copyright (C) <2014-2015 Danielle Madeley <danielle@madeley.id.au>
59+
5760
Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org>
5861

5962

aloe/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
from future import standard_library
2828
standard_library.install_aliases()
2929

30-
__version__ = '0.0.17'
31-
3230
import sys
3331
import threading
3432

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
# built documents.
6363
#
6464
# The short X.Y version.
65-
from aloe import __version__
65+
from setup import __version__
6666
version = release = __version__
6767

6868
# The language for content autogenerated by Sphinx. Refer to documentation

setup.py

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,40 @@
1818
Setup script.
1919
"""
2020

21+
__version__ = '0.0.17'
22+
23+
import os
2124
from setuptools import setup, find_packages
2225

23-
from aloe import __version__
24-
25-
with open('requirements.txt') as requirements, \
26-
open('test_requirements.txt') as test_requirements:
27-
setup(
28-
name='aloe',
29-
version=__version__,
30-
description='Gherkin runner compatible with Lettuce',
31-
author='Alexey Kotlyarov',
32-
author_email='a@koterpillar.com',
33-
url='https://github.com/koterpillar/aloe',
34-
long_description=open('README.md').read(),
35-
classifiers=[
36-
('License :: OSI Approved :: ' +
37-
'GNU General Public License v3 or later (GPLv3+)'),
38-
],
39-
40-
packages=find_packages(exclude=['tests']),
41-
include_package_data=True,
42-
43-
entry_points={
44-
'console_scripts': [
45-
'aloe = aloe:main',
26+
if __name__ == '__main__':
27+
with \
28+
open('requirements.txt') as requirements, \
29+
open('test_requirements.txt') as test_requirements, \
30+
open('README.md') as readme:
31+
setup(
32+
name='aloe',
33+
version=__version__,
34+
description='Gherkin runner compatible with Lettuce',
35+
author='Alexey Kotlyarov',
36+
author_email='a@koterpillar.com',
37+
url='https://github.com/koterpillar/aloe',
38+
long_description=readme.read(),
39+
classifiers=[
40+
('License :: OSI Approved :: ' +
41+
'GNU General Public License v3 or later (GPLv3+)'),
4642
],
47-
},
4843

49-
install_requires=requirements.read().splitlines(),
44+
packages=find_packages(exclude=['tests']),
45+
include_package_data=True,
46+
47+
entry_points={
48+
'console_scripts': [
49+
'aloe = aloe:main',
50+
],
51+
},
52+
53+
install_requires=requirements.readlines(),
5054

51-
test_suite='tests',
52-
tests_require=test_requirements.read().splitlines(),
53-
)
55+
test_suite='tests',
56+
tests_require=test_requirements.readlines(),
57+
)

0 commit comments

Comments
 (0)