-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of the following: commit ce04005 Author: huxuan <[email protected]> Date: Tue Mar 3 23:02:33 2020 +0800 No relative import. commit bfd878b Author: huxuan <[email protected]> Date: Tue Mar 3 22:59:14 2020 +0800 Various packaging improvement. commit 9bc059a Author: huxuan <[email protected]> Date: Mon Jan 20 12:27:41 2020 +0800 Minor change. commit 27d0e54 Author: huxuan <[email protected]> Date: Sun Jan 19 22:34:51 2020 +0800 Fix broken url in README. commit ad68291 Author: huxuan <[email protected]> Date: Tue Jan 14 15:31:51 2020 +0800 Minor change in docs.
- Loading branch information
Showing
18 changed files
with
179 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,53 @@ | ||
.PHONY: clean install dev lint pycodestyle pyflakes pylint dist upload docs | ||
.PHONY: clean install dev flake8 pylint lint dist upload uploadtest test docs | ||
|
||
PKG := $(shell basename $(CURDIR) | cut -d- -f1) | ||
PIPRUN := $(shell command -v pipenv > /dev/null && echo pipenv run) | ||
|
||
clean: | ||
find . -name '*.pyc' -print0 | xargs -0 rm -f | ||
find . -name '*.swp' -print0 | xargs -0 rm -f | ||
find . -name '.DS_Store' -print0 | xargs -0 rm -rf | ||
find . -name '__pycache__' -print0 | xargs -0 rm -rf | ||
-rm -rf build dist *.egg-info .eggs *.spec docs/_build | ||
rm -rf build dist *.egg-info .eggs || true | ||
rm -rf .tox .coverage cover || true | ||
rm -rf docs/_build || true | ||
rm -rf Pipfile.lock || true | ||
rm -rf .vscode || true | ||
command -v pipenv > /dev/null && \ | ||
pipenv --venv > /dev/null 2>&1 && \ | ||
pipenv --rm || true | ||
|
||
install: | ||
pip install . | ||
command -v pipenv > /dev/null && \ | ||
pipenv install --skip-lock -e . || \ | ||
pip install -e . | ||
|
||
dev: | ||
pip install .[dev] | ||
|
||
lint: pycodestyle pyflakes pylint | ||
|
||
pycodestyle: | ||
-pycodestyle setup.py iptvtools | ||
command -v pipenv > /dev/null && \ | ||
pipenv install --skip-lock --dev || true | ||
|
||
pyflakes: | ||
-pyflakes setup.py iptvtools | ||
flake8: | ||
${PIPRUN} flake8 \ | ||
--import-order-style google \ | ||
--application-import-names ${PKG} \ | ||
setup.py tests ${PKG} | ||
|
||
pylint: | ||
-pylint setup.py iptvtools | ||
${PIPRUN} pylint setup.py tests ${PKG} | ||
|
||
dist: clean | ||
python setup.py sdist bdist_wheel | ||
lint: dev flake8 pylint | ||
|
||
dist: clean install | ||
${PIPRUN} python setup.py sdist bdist_wheel | ||
|
||
upload: | ||
twine upload dist/* | ||
${PIPRUN} twine upload dist/* | ||
|
||
uploadtest: | ||
${PIPRUN} twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
|
||
docs: clean install | ||
cd docs && make html | ||
docs: install | ||
cd docs && ${PIPRUN} make html | ||
|
||
docsdeps: | ||
pip install -r docs/requirements.txt | ||
test: clean | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
flake8 = "*" | ||
flake8-commas = "*" | ||
flake8-docstrings = "*" | ||
flake8-import-order = "*" | ||
pep8-naming = "*" | ||
pylint = "*" | ||
sphinx = "*" | ||
sphinx-rtd-theme = "*" | ||
sphinxcontrib-programoutput = "*" | ||
|
||
[packages] | ||
iptvtools = {editable = true,path = "."} | ||
|
||
[requires] | ||
python_version = "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Init for iptvtools. | ||
File: __init__.py | ||
Author: huxuan | ||
Email: i(at)huxuan.org | ||
Description: iptvtools package. | ||
""" | ||
__version__ = '0.1.6' | ||
from pkg_resources import DistributionNotFound | ||
from pkg_resources import get_distribution | ||
|
||
__version__ = '0.0.0' | ||
try: | ||
__version__ = get_distribution(__name__).version | ||
except DistributionNotFound: | ||
# package is not installed | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Constants for iptvtools. | ||
File: __init__.py | ||
Author: huxuan | ||
Email: i(at)huxuan.org | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Tags for iptvtools. | ||
File: constants.py | ||
Author: huxuan | ||
Email: i(at)huxuan.org | ||
Description: Tags for iptvtools. | ||
""" | ||
M3U = '#EXTM3U' | ||
INF = '#EXTINF' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.