-
-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2191 from jimklimov/python-pkg
Fix contents and recipes for Python packaging
- Loading branch information
Showing
5 changed files
with
73 additions
and
28 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
/build | ||
/dist | ||
/src | ||
/.tox | ||
/README.txt | ||
/.pypi-* | ||
/LICENSE-GPL3 |
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 |
---|---|---|
|
@@ -18,15 +18,20 @@ setup( | |
name = "PyNUTClient", | ||
version = '@NUT_SOURCE_GITREV_NUMERIC@', | ||
author = "The Network UPS Tools project", | ||
license_files = ('LICENSE-GPL3',), | ||
license_files = ('LICENSE-GPL3',), | ||
author_email = "[email protected]", | ||
description = "Python client bindings for NUT", | ||
url = "https://github.com/networkupstools/nut/tree/master/scripts/python/module", | ||
long_description_content_type = "text/plain", # NOTE: No asciidoc so far, see https://packaging.python.org/en/latest/specifications/core-metadata/ | ||
long_description = long_description, | ||
packages = find_packages(), | ||
packages = find_packages(), | ||
#py_modules = ['PyNUT'], | ||
package_dir = {'PyNUT': 'PyNUTClient'}, | ||
data_files = [('', ['tox.ini'])], | ||
#scripts = ['PyNUTClient/test_nutclient.py', 'PyNUTClient/__init__.py'], | ||
python_requires = '>=2.6', | ||
# install_requires = ['telnetlib'], # NOTE: telnetlib.py is part of Python core for tested 2.x and 3.x versions, not something 'pip' can download | ||
keywords = ['pypi', 'cicd', 'python'], | ||
keywords = ['pypi', 'cicd', 'python', 'nut', 'Network UPS Tools'], | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
|
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,25 @@ | ||
# Configuration for Python test environment manager | ||
# https://tox.wiki/en/latest/user_guide.html | ||
# | ||
# Note that to run `test_nutclient.py` you must prepare a running NUT data | ||
# server (upsd) with a connected driver. You can use a dummy-ups driver for | ||
# that, see e.g. NUT tests/NIT/nit.sh for how the test beds are prepared. | ||
# Further you may need to export `NUT_HOST` and `NUT_PORT` (if not default), | ||
# and a `NUT_USER` and `NUT_PASS` for tests with logged-in session behaviors. | ||
# Then just run `tox` (may have to `pip install tox` first though). | ||
|
||
[tox] | ||
envlist = | ||
py2{6,7} | ||
py3{5,5,6,7,8,9,10,11,12,13} | ||
|
||
[testenv] | ||
setenv = | ||
PYTHONPATH = {toxinidir}:{toxinidir}/src/PyNUTClient | ||
|
||
commands_pre = | ||
python -m pip install -U pip | ||
|
||
commands = | ||
python src/PyNUTClient/test_nutclient.py | ||
#py.test --basetemp={envtmpdir} |