diff --git a/.gitignore b/.gitignore index 16a2c86..d896106 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 81a1452..2c1b765 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 d4150ac..ca2de59 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 0000000..2a00ed9 --- /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 adb6a23..da90e87 100755 --- a/setup.py +++ b/setup.py @@ -48,9 +48,10 @@ setup( 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"],