Skip to content

Commit 83ea2b8

Browse files
authored
Merge pull request #7 from KeepSafe/update-packaging
chore: updates package to be leverage modern pip/build/twine and pypicloud
2 parents 538e9ae + b69fd6d commit 83ea2b8

File tree

3 files changed

+32
-10
lines changed

3 files changed

+32
-10
lines changed

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6.6
1+
3.6.8

Makefile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@ PIP=venv/bin/pip
55
NOSE=venv/bin/nosetests
66
FLAKE=venv/bin/flake8
77
FLAGS=
8+
PYPICLOUD_HOST=pypicloud.getkeepsafe.local
9+
TWINE=./venv/bin/twine
810

11+
update:
12+
$(PIP) install -U pip
13+
$(PIP) install -U .
914

1015
env:
11-
python3 -m venv venv
12-
$(PYTHON) ./setup.py develop
16+
test -d venv || python3 -m venv venv
1317

14-
dev:
15-
$(PIP) install -r requirements-dev.txt
16-
$(PYTHON) ./setup.py develop
18+
dev: env update
19+
$(PIP) install .[tests,devtools]
1720

18-
install:
19-
$(PYTHON) ./setup.py install
21+
install: env update
22+
23+
publish:
24+
rm -rf dist
25+
$(PYTHON) -m build .
26+
$(TWINE) upload --verbose --sign --username developer --repository-url http://$(PYPICLOUD_HOST)/simple/ dist/*.whl
2027

2128
flake:
2229
$(FLAKE) sdiff tests

setup.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from setuptools import setup, find_packages
33

44

5-
version = '0.4.0'
5+
version = '0.4.1'
66

77

88
def read(f):
@@ -13,10 +13,20 @@ def read(f):
1313
'mistune <= 1',
1414
]
1515

16+
tests_require = [
17+
'nose',
18+
'flake8',
19+
'autopep8',
20+
]
21+
22+
devtools_require = [
23+
'twine',
24+
'build',
25+
]
26+
1627
setup(name='sdiff',
1728
version=version,
1829
description=('sdiff compares the structure of two markdown texts'),
19-
long_description='\n\n'.join((read('README.md'), read('CHANGELOG'))),
2030
classifiers=[
2131
'License :: OSI Approved :: BSD License',
2232
'Intended Audience :: Developers',
@@ -29,4 +39,9 @@ def read(f):
2939
package_data={},
3040
namespace_packages=[],
3141
install_requires=install_requires,
42+
tests_require=tests_require,
43+
extras_require={
44+
'tests': tests_require,
45+
'devtools': devtools_require,
46+
},
3247
include_package_data=False)

0 commit comments

Comments
 (0)