Skip to content

Commit ceef0e5

Browse files
committed
Use poetry to manage project
1 parent aba5af7 commit ceef0e5

9 files changed

+46
-71
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ nosetests.xml
2020
.DS_Store
2121
.idea/*
2222
.python-version
23+
.pytest_cache
2324

2425
/test.py
2526
/test_*.py
@@ -28,3 +29,6 @@ benchmark.py
2829
results.json
2930
profile.html
3031
/wheelhouse
32+
33+
34+
pyproject.lock

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ python:
77
- "pypy"
88

99
install:
10-
- pip install -r tests-requirements.txt
10+
- curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
11+
- python get-poetry.py --preview
12+
- poetry install -v
1113

12-
script: py.test -q tests/
14+
script: poetry run pytest -q tests/

Makefile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,15 @@ list:
88
# required for list
99
no_targets__:
1010

11-
# install all dependencies
12-
setup: setup-python
13-
14-
release: tar wheel
11+
release:
12+
@poetry build
1513

1614
publish:
17-
@python -m twine upload dist/pytzdata-$(RELEASE)*
18-
19-
tar:
20-
@python setup.py sdist --formats=gztar
21-
22-
wheel:
23-
@pip wheel --no-index --no-deps --wheel-dir dist dist/pytzdata-$(RELEASE).tar.gz
15+
@poetry publish --no-build
2416

2517
# test your application (tests in the tests/ directory)
2618
test:
27-
@py.test tests/ -sq
19+
@poetry run pytest tests/ -sq
2820

2921
# run tests against all supported python versions
3022
tox:

pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[tool.poetry]
2+
name = "pytzdata"
3+
version = "2018.5"
4+
description = "Official timezone database for Python."
5+
authors = [
6+
"Sébastien Eustace <sebastien@eustace.io>"
7+
]
8+
license = "MIT"
9+
10+
readme = "README.rst"
11+
12+
homepage = "https://github.com/sdispater/pytzdata"
13+
repository = "https://github.com/sdispater/pytzdata"
14+
15+
classifiers = [
16+
"Operating System :: OS Independent",
17+
"Topic :: Software Development :: Libraries :: Python Modules"
18+
]
19+
20+
[tool.poetry.dependencies]
21+
python = "~2.7 || ^3.4"
22+
23+
24+
[tool.poetry.dev-dependencies]
25+
autopep8 = "^1.3"
26+
cleo = "^0.6.5"
27+
pytest = "^3.5"
28+
tox = "^3.0"

requirements.txt

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

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

tests-requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

tox.ini

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[tox]
2+
skipsdist = True
23
envlist = py27, py35, py36, pypy
34

45
[testenv]
5-
deps = -rtests-requirements.txt
6-
commands = py.test tests -sq
6+
whitelist_externals = poetry
7+
skip_install = true
8+
commands =
9+
poetry install -v
10+
poetry run pytest tests/

0 commit comments

Comments
 (0)