[deps] Updated dependencies and added files for standard packaging.

The halfapi-cli tool needs to be installed using [cli] option :
pip3 install -e .[cli]
This commit is contained in:
Maxime Alves LIRMM@home 2020-07-29 21:08:02 +02:00
parent 4d02cf4acd
commit 7ef6e78010
5 changed files with 33 additions and 11 deletions

10
MANIFEST.in Normal file
View File

@ -0,0 +1,10 @@
include pyproject.toml
# Include the README
include *.md
# Include the license file
include LICENSE.txt
# Include the data files
recursive-include data *

5
pyproject.toml Normal file
View File

@ -0,0 +1,5 @@
[build-system]
# These are the assumed default build requirements from pip:
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
requires = ["setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"

View File

@ -3,3 +3,4 @@ starlette
uvicorn
jwt
half_orm @ git+ssh://git@gite.lirmm.fr/newsi/halfORM.git
pygit2==0.28.2

2
setup.cfg Normal file
View File

@ -0,0 +1,2 @@
[metadata]
license_files = LICENSE

View File

@ -6,6 +6,7 @@ import re
from setuptools import setup, find_packages
import pathlib
def get_version(package):
"""
@ -19,9 +20,8 @@ def get_long_description():
"""
Return the README.
"""
with open("README.md", encoding="utf8") as f:
return f.read()
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / 'README.md').read_text(encoding='utf-8')
def get_packages(package):
"""
@ -36,23 +36,27 @@ def get_packages(package):
module_name="halfapi"
setup(
name=module_name,
python_requires=">=3.7",
version=get_version(module_name),
url="https://gite.lirmm.fr/newsi/api/halfapi",
url="https://gite.lirmm.fr/malves/halfapi",
long_description=get_long_description(),
long_description_content_type="text/markdown",
packages=get_packages(module_name),
package_data={
'halfapi': ['lib/*', 'models/*']
},
python_requires=">=3.7",
install_requires=[
"click",
"half_orm",
"jwt",
"starlette",
"uvicorn"],
],
extras_require={
"tests":["pytest", "requests"],
"tests":[
"pytest",
"requests"
],
"cli":[
"click",
"pygit2",
"uvicorn"
]
},
entry_points={
"console_scripts":[