From 7f79530dc2dcb63d43396a313ef1e5e8c0f6bf0b Mon Sep 17 00:00:00 2001 From: Ivan Subotic Date: Thu, 21 Mar 2019 11:14:03 +0100 Subject: [PATCH] chore: configure dependencies and command line --- README.md | 31 ++++++++++++++++++++++++++++--- requirements.txt | 19 +++++-------------- setup.py | 12 ++++++++++-- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index c6cc292a0..c37b067cc 100644 --- a/README.md +++ b/README.md @@ -515,12 +515,37 @@ $ pip3 freeze > requirements.txt Generate distribution package. Make sure you have the latest versions of `setuptools` and `wheel` installed: ```bash -$ python3 -m pip install --user --upgrade setuptools wheel +$ python3 -m pip install --user --upgrade pip setuptools wheel $ python3 setup.py sdist bdist_wheel ``` -Upload package with `twine`: + +You can install the package locally from the dist: + +```bash +$ python3 -m pip ./dist/some_name.whl +``` + +Upload package with `twine`, + +first create `~/.pypirc`: + +```bash +[distutils] +index-servers=pypi +[pypi] +repository = https://upload.pypi.org/legacy/ +username =your_username_on_pypi +``` + +then upload: ```bash -$ python3 -m pip install --user --upgrade twine +$ python3 -m pip install --user --upgrade tqdm twine $ python3 -m twine dist/* ``` + +For local development: + +```bash +$ python3 setup.py develop +``` diff --git a/requirements.txt b/requirements.txt index e582d90ba..c1f84e6e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,5 @@ -certifi==2018.11.29 -chardet==3.0.4 -decorator==4.3.0 -idna==2.8 -isodate==0.6.0 -jsonschema==2.6.0 -lxml==4.3.0 -pprint==0.1 -pyparsing==2.3.1 -rdflib==4.2.2 -requests==2.21.0 -six==1.12.0 -urllib3==1.24.1 -validators==0.12.4 +pip +setuptools +wheel +tqdm +twine diff --git a/setup.py b/setup.py index 004cd396e..de611b09f 100644 --- a/setup.py +++ b/setup.py @@ -5,18 +5,26 @@ setuptools.setup( name='knora', - version='0.0.2', + version='0.0.3', description='A Python library and tools for the Knora-API', url='https://github.com/dhlab-basel/knora-py', author='Lukas Rosenthaler', author_email='lukas.rosenthaler@unibas.ch', license='GPLv3', - zip_safe=False, packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", ], + install_requires=[ + 'rdflib', + 'lxml', + 'validators' + ], + entry_points={ + 'console_scripts': ['knora-create-ontology=knora.create_ontology:main'], + }, include_package_data=True, + zip_safe=False )