Skip to content

Commit 61cf147

Browse files
authored
updates package to be leverage modern pip/build/twine and pypicloud (#30)
* chore: updates package to be leverage modern pip/build/twine and pypicloud - upgrade python version to 3.6.8 - make env creates venv only if it does not exist - relay on pip completly while installing = one dependency resolve - devtools as extras - loosen up requirements defined in setup - pypicloud package publishing make target - removes long_description as incompatible with build module * chore: travis uses make targets * chore: use sdiff aka html-structure-diff from git as travis do not have access to pypicloud
1 parent b1910e5 commit 61cf147

File tree

4 files changed

+37
-16
lines changed

4 files changed

+37
-16
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

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ python:
33
- "3.6"
44
# command to install dependencies
55
install:
6-
- pip install git+https://github.com/KeepSafe/html-structure-diff.git#egg=sdiff
7-
- pip install -r requirements-dev.txt
6+
- make dev
87
# command to run tests
98
script:
10-
- flake8 validator tests
11-
- nosetests
9+
- make tests

Makefile

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,27 @@ PYTHON=venv/bin/python3
44
PIP=venv/bin/pip
55
NOSE=venv/bin/nosetests
66
FLAKE=venv/bin/flake8
7+
PYPICLOUD_HOST=pypicloud.getkeepsafe.local
8+
PIP_ARGS=--extra-index=http://$(PYPICLOUD_HOST)/simple/ --trusted-host $(PYPICLOUD_HOST)
9+
TWINE=./venv/bin/twine
710
FLAGS=
811

12+
update:
13+
$(PIP) install -U pip
14+
$(PIP) install $(PIP_ARGS) -U .
915

1016
env:
11-
python3 -m venv venv
12-
$(PIP) install -e git://github.com/KeepSafe/html-structure-diff.git#egg=sdiff
13-
$(PYTHON) ./setup.py develop
17+
test -d venv || python3 -m venv venv
1418

15-
dev:
16-
$(PIP) install flake8 nose coverage
17-
$(PYTHON) ./setup.py develop
19+
dev: env update
20+
$(PIP) install $(PIP_ARGS) .[tests,devtools]
1821

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

2229
flake:
2330
$(FLAKE) validator tests

setup.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,52 @@
22
from setuptools import setup, find_packages
33

44

5-
version = '0.7.0'
5+
version = '0.7.1'
66

77

88
def read(f):
99
return open(os.path.join(os.path.dirname(__file__), f)).read().strip()
1010

1111

1212
install_requires = [
13+
'sdiff @ git+ssh://[email protected]/KeepSafe/html-structure-diff.git#egg=sdiff',
1314
'aiohttp >=3, <3.4',
1415
'Markdown',
1516
'parse >=1, <2',
1617
'beautifulsoup4 >=4, <5',
1718
'lxml >=3',
1819
]
1920

21+
tests_require = [
22+
'nose',
23+
'flake8==3.6.0',
24+
'coverage',
25+
]
26+
27+
devtools_require = [
28+
'twine',
29+
'build',
30+
]
31+
2032
setup(
2133
name='content-validator',
2234
version=version,
2335
description=('Content validator looks at text content and preforms different validation tasks'),
24-
long_description='\n\n'.join((read('README.md'), read('CHANGELOG'))),
2536
classifiers=[
2637
'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Programming Language :: Python'
2738
],
2839
author='Keepsafe',
2940
author_email='[email protected]',
30-
url='https://github.com/KeepSafe/google-play-cmd/',
41+
url='https://github.com/KeepSafe/content-validator/',
3142
license='Apache',
3243
packages=find_packages(exclude=['tests']),
3344
package_data={},
3445
namespace_packages=[],
3546
install_requires=install_requires,
47+
tests_require=tests_require,
48+
extras_require={
49+
'tests': tests_require,
50+
'devtools': devtools_require,
51+
},
3652
entry_points={'console_scripts': ['content-validator = validator:main']},
3753
include_package_data=False)

0 commit comments

Comments
 (0)