Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Commit

Permalink
PyPi: prepare sources for packaging
Browse files Browse the repository at this point in the history
Additions:
- [makefile] setuptools bdist_wheel target
- [makefile] twine upload targets (pypi, pypitest)
- [setuptools] setup.cfg configuration file

Modifications:
- [git] add .gitattributes
- [readme] switch from Markdown to RST
- [requirements] group all files as requirements/<req>.txt
- [setuptools] include example resources

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
  • Loading branch information
virtualtam committed Dec 26, 2015
1 parent 4b53604 commit 1cad57d
Show file tree
Hide file tree
Showing 12 changed files with 265 additions and 177 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Set default behavior
* text=auto eol=lf

# Ensure sources are processed
*.cfg text
*.ini text
*.py text diff=python
*.rst text
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ python:
- 3.4
- 2.7
install:
- pip install -r tests/requirements.txt
- pip install -r requirements/tests.txt
script:
- make
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NPROC := $(shell nproc)
PYTHONFILES := $(shell find . -not -path "*build*" -not -path "*.tox*" -name '*.py')

.PHONY: clean distclean
all: lint basic_coverage sdist build
all: lint coverage sdist build

clean:
@rm -rf build dist
Expand All @@ -19,9 +19,19 @@ sdist: clean
build: clean
@python setup.py build

bdist_wheel: clean
@python setup.py bdist_wheel

install: build
@python setup.py install

# pypi
twine: sdist bdist_wheel
@twine upload dist/* -s

test_twine: sdist bdist_wheel
@twine upload dist/* -s -r pypitest --skip-existing

# static analysis
lint: isort pep8 pep257 pylint

Expand All @@ -38,12 +48,12 @@ pylint: clean
@pylint -j $(NPROC) $(PYTHONFILES)

# testing
basic_coverage: clean
coverage: clean
@echo "=== Coverage ==="
@coverage run --source=$(PACKAGE) -m unittest discover -s tests
@coverage report

coverage: clean basic_coverage
coverage_html: clean coverage
@rm -rf htmlcov
@coverage html

Expand Down
169 changes: 0 additions & 169 deletions README.md

This file was deleted.

Loading

0 comments on commit 1cad57d

Please sign in to comment.