Skip to content

Commit f4097f6

Browse files
authored
Merge pull request #18 from hetznercloud/prepare-setup-py
Prepare setup.py for deployment
2 parents 95120b9 + 374f4ec commit f4097f6

9 files changed

Lines changed: 22 additions & 24 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ before_script:
1414
- docker ps -a
1515
- sleep 10
1616
install:
17-
- pip install -r requirements/dev.txt
1817
- pip install .
18+
- pip install -r requirements/test.txt
1919
- pip install tox-travis
2020
script: tox && tox -e flake8
2121
deploy:

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Official Hetzner Cloud python library
1818

1919
Setup Dev environment
2020
---------------------
21-
1) `mkvirtualenv hcloud-python`.
21+
1) `mkvirtualenv hcloud-python`
2222

23-
2) `pip install -r requirements/dev.txt`.
23+
2) `pip install -e .` or `pip install -e .[docs]` to be able to build docs
2424

2525

2626
Run tests

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements/base.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
future==0.17.1
2-
python-dateutil==2.7.5
3-
recommonmark==0.4.0
4-
requests==2.20.0
5-
Sphinx==1.8.1
6-
sphinx-rtd-theme==0.4.2
1+
.

requirements/production.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
-r base.txt
22

3-
# black==18.9b0 black requires python >=3.6
43
flake8==3.5.0
54
isort==4.3.4
65
mock==2.0.0

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ exclude =
1313

1414

1515
[aliases]
16-
# Define setup.py command aliases here
1716
test = pytest
1817

1918
[tool:pytest]

setup.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@
1111
with open('CHANGELOG.md') as changelog_file:
1212
changelog = changelog_file.read()
1313

14-
requirements = []
15-
16-
setup_requirements = ['pytest-runner', ]
17-
18-
test_requirements = ['pytest', ]
14+
requirements = [
15+
"future==0.17.1",
16+
"python-dateutil==2.7.5",
17+
"requests==2.20.0"
18+
]
19+
20+
extras_require = {
21+
'docs': [
22+
"Sphinx==1.8.1",
23+
"sphinx-rtd-theme==0.4.2"
24+
]
25+
}
1926

2027
version = {}
2128
with open("hcloud/version.py") as fp:
@@ -36,17 +43,17 @@
3643
'Programming Language :: Python :: 3.6',
3744
'Programming Language :: Python :: 3.7',
3845
],
46+
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.8',
3947
description="Official Hetzner Cloud python library",
4048
install_requires=requirements,
49+
extras_require=extras_require,
4150
license="MIT license",
4251
long_description=readme + '\n\n' + changelog,
4352
include_package_data=True,
44-
keywords='hcloud',
53+
keywords='hcloud hetzner cloud',
4554
name='hcloud',
46-
packages=find_packages(exclude=["examples", "tests"]),
47-
setup_requires=setup_requirements,
55+
packages=find_packages(exclude=["examples", "tests", "docs"]),
4856
test_suite='tests',
49-
tests_require=test_requirements,
5057
url='https://github.com/hetznercloud/hcloud-python',
5158
version=version['VERSION'],
5259
zip_safe=False,

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ envlist = py27, py34, py35, py36, py37, flake8
44
[testenv:flake8]
55
basepython = python
66
deps = flake8==3.6.0
7-
commands = flake8 hcloud tests
7+
commands = flake8 hcloud tests setup.py
88

99
[testenv]
1010
passenv = FAKE_API_ENDPOINT
1111
deps =
12-
-r{toxinidir}/requirements/dev.txt
12+
-r{toxinidir}/requirements/test.txt
1313
commands =
1414
pytest
1515

0 commit comments

Comments
 (0)