-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup script as proper python package
- Loading branch information
Showing
7 changed files
with
90 additions
and
3 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
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,7 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"wheel", | ||
] | ||
|
||
build-backend = "setuptools.build_meta" |
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,6 @@ | ||
[pytest] | ||
flake8-ignore = | ||
E251 # unexpected spaces around keyword | ||
E221 # multiple spaces before operator | ||
F401 # unused imports | ||
flake8-max-line-length = 100 |
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,3 @@ | ||
pytest==6.2.5 | ||
pytest-cov==2.12.1 | ||
pytest-flake8==1.0.7 |
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,2 @@ | ||
[metadata] | ||
license_files = LICENSE |
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,44 @@ | ||
from setuptools import setup, find_packages | ||
import pkg_resources | ||
import pathlib | ||
|
||
here = pathlib.Path(__file__).parent.resolve() | ||
|
||
long_description = (here / 'README.md').read_text(encoding='utf-8') | ||
|
||
requirements = [] | ||
|
||
extras_require = { | ||
'dev': [ | ||
'pytest', | ||
'pytest-cov', | ||
'pytest-flake8' | ||
] | ||
} | ||
|
||
if __name__ == "__main__": | ||
setup( | ||
name="copy-tree-map", | ||
version='0.1.0', | ||
description='Clone a directory tree while possibly filtering and/or transforming files', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/MawKKe/copy-tree-map', | ||
author='Markus H (MawKKe)', | ||
author_email='[email protected]', | ||
license='Apache 2.0', | ||
package_date={'': ['LICENSE']}, | ||
py_modules=["copy_tree_map"], | ||
entry_points={ | ||
'console_scripts': { | ||
'copy-tree-map=copy_tree_map:main' | ||
} | ||
}, | ||
python_requires='>=3.5, <4', | ||
install_requires=requirements, | ||
extras_require=extras_require, | ||
project_urls={ | ||
'Bug reports': 'https://github.com/MawKKe/copy-tree-map/issues', | ||
'Source': 'https://github.com/MawKKe/copy-tree-map' | ||
}, | ||
) |
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,18 @@ | ||
[tox] | ||
# NOTE: old py36, py39 etc don't seem to work with newer tox (> 3.24.0 ?) | ||
envlist = python{3.5,3.6,3.7,3.8,3.9},lint,coverage | ||
|
||
[testenv] | ||
deps = -rrequirements-dev.txt | ||
commands = | ||
pytest tests {posargs} | ||
|
||
[testenv:lint] | ||
usedevelop = True | ||
commands = | ||
pytest --flake8 copy_tree_map.py | ||
|
||
[testenv:coverage] | ||
usedevelop = True | ||
commands = | ||
pytest --cov copy_tree_map --cov-report=term-missing tests {posargs} |