From 449dc2066b2773832b7efedcb83171a014c76ccb Mon Sep 17 00:00:00 2001 From: Yuri Baburov Date: Sat, 4 Jul 2020 08:02:19 +0700 Subject: [PATCH] Releases packaging improvements. --- .gitignore | 7 +++++-- Makefile | 18 +++++++++++------- README.rst | 2 +- requirements-dev.txt | 6 ++++++ setup.py | 3 ++- 5 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.gitignore b/.gitignore index 16a2c86e..d8961065 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ *.pyc +__pycache__ *.egg-info -build -dist +/build +/dist /bin /include /lib @@ -12,3 +13,5 @@ nosetests.xml .tox .idea .cache +/.noseids +/.venv \ No newline at end of file diff --git a/Makefile b/Makefile index 81a14523..2c1b7656 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PY := .venv/bin/python PIP := .venv/bin/pip PEP8 := .venv/bin/pep8 NOSE := .venv/bin/nosetests +TWINE := twine # ########### # Tests rule! @@ -12,22 +13,24 @@ NOSE := .venv/bin/nosetests test: venv develop $(NOSE) $(NOSE) --with-id -s tests -$(NOSE): - $(PIP) install nose pep8 coverage +$(NOSE): setup # ####### # INSTALL # ####### .PHONY: all -all: venv develop +all: setup develop venv: .venv/bin/python +setup: venv + $(PIP) install -r requirements-dev.txt + .venv/bin/python: virtualenv .venv -.PHONY: clean_venv -clean_venv: +.PHONY: clean +clean: rm -rf .venv develop: .venv/lib/python*/site-packages/readability-lxml.egg-link @@ -48,11 +51,12 @@ clean_all: clean_venv # ########### .PHONY: dist dist: - $(PY) setup.py sdist + $(PY) setup.py sdist bdist_wheel + $(TWINE) check dist/* .PHONY: upload upload: - $(PY) setup.py sdist upload + $(TWINE) upload dist/* .PHONY: version_update version_update: diff --git a/README.rst b/README.rst index d4150aca..ca2de59e 100644 --- a/README.rst +++ b/README.rst @@ -52,7 +52,7 @@ Change Log - 0.3 Added Document.encoding, positive\_keywords and negative\_keywords Licensing --------- +--------- This code is under `the Apache License 2.0 `__ license. diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..2a00ed9a --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,6 @@ +lxml +chardet +nose +pep8 +coverage +timeout_decorator diff --git a/setup.py b/setup.py index adb6a239..da90e872 100755 --- a/setup.py +++ b/setup.py @@ -48,9 +48,10 @@ def find_version(*file_paths): version=find_version("readability", "__init__.py"), author="Yuri Baburov", author_email="burchik@gmail.com", - description="fast html to text parser (article readability tool) with python3 support", + description="fast html to text parser (article readability tool) with python 3 support", test_suite="tests.test_article_only", long_description=open("README.rst").read(), + long_description_content_type='text/x-rst', license="Apache License 2.0", url="http://github.com/buriy/python-readability", packages=["readability", "readability.compat"],