Better installation; add example_app
This commit is contained in:
parent
af885c2aec
commit
5029c16873
|
@ -1 +1,2 @@
|
||||||
recursive-include ereuse_devicehub/dummy/files *.yaml
|
recursive-include ereuse_devicehub/dummy/files *.yaml
|
||||||
|
recursive-include ereuse_devicehub/ *.pyi
|
|
@ -0,0 +1,4 @@
|
||||||
|
from distutils.version import StrictVersion
|
||||||
|
|
||||||
|
__version__ = '0.2.0a10'
|
||||||
|
version = StrictVersion(__version__)
|
10
example_app.py
Normal file
10
example_app.py
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
from ereuse_devicehub.config import DevicehubConfig
|
||||||
|
from ereuse_devicehub.devicehub import Devicehub
|
||||||
|
|
||||||
|
|
||||||
|
class MyConfig(DevicehubConfig):
|
||||||
|
ORGANIZATION_NAME = 'My org'
|
||||||
|
ORGANIZATION_TAX_ID = 'foo-bar'
|
||||||
|
|
||||||
|
|
||||||
|
app = Devicehub(MyConfig())
|
38
setup.py
38
setup.py
|
@ -1,24 +1,37 @@
|
||||||
|
import re
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
with open('README.md') as f:
|
with open('README.md', encoding='utf8') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
|
with open('ereuse_devicehub/__init__.py', 'rt', encoding='utf8') as f:
|
||||||
|
version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='ereuse-devicehub',
|
name='ereuse-devicehub',
|
||||||
version='0.2.0a10',
|
version=version,
|
||||||
packages=find_packages(),
|
|
||||||
url='https://github.com/ereuse/devicehub-teal',
|
url='https://github.com/ereuse/devicehub-teal',
|
||||||
|
project_urls=OrderedDict((
|
||||||
|
('Documentation', 'http://devicheub.ereuse.org'),
|
||||||
|
('Code', 'http://github.com/ereuse/devicehub-teal'),
|
||||||
|
('Issue tracker', 'https://tree.taiga.io/project/ereuseorg-devicehub/issues?q=rules')
|
||||||
|
)),
|
||||||
license='Affero',
|
license='Affero',
|
||||||
author='eReuse.org team',
|
author='eReuse.org team',
|
||||||
author_email='x.bustamante@ereuse.org',
|
author_email='x.bustamante@ereuse.org',
|
||||||
include_package_data=True,
|
|
||||||
description='A system to manage devices focusing reuse.',
|
description='A system to manage devices focusing reuse.',
|
||||||
|
packages=find_packages(),
|
||||||
|
include_package_data=True,
|
||||||
|
platforms='any',
|
||||||
|
python_requires='>=3.5.3',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'teal>=0.2.0a6',
|
'teal>=0.2.0a6',
|
||||||
'marshmallow_enum',
|
'marshmallow_enum',
|
||||||
'ereuse-utils[Naming]>=0.3.0b2',
|
'ereuse-utils[Naming]>=0.4b1',
|
||||||
'psycopg2-binary',
|
'psycopg2-binary',
|
||||||
'requests',
|
'requests',
|
||||||
'requests-toolbelt',
|
'requests-toolbelt',
|
||||||
|
@ -29,6 +42,14 @@ setup(
|
||||||
'PyYAML',
|
'PyYAML',
|
||||||
'python-stdnum'
|
'python-stdnum'
|
||||||
],
|
],
|
||||||
|
extras_require={
|
||||||
|
'docs': [
|
||||||
|
'sphinx',
|
||||||
|
'sphinxcontrib-httpdomain >= 1.5.0',
|
||||||
|
'sphinxcontrib-plantuml >= 0.11',
|
||||||
|
'sphinxcontrib-websupport >= 1.0.1'
|
||||||
|
]
|
||||||
|
},
|
||||||
tests_requires=[
|
tests_requires=[
|
||||||
'pytest',
|
'pytest',
|
||||||
'pytest-datadir',
|
'pytest-datadir',
|
||||||
|
@ -37,12 +58,15 @@ setup(
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 2 - Pre-Alpha',
|
'Development Status :: 2 - Pre-Alpha',
|
||||||
'Environment :: Web Environment',
|
'Environment :: Web Environment',
|
||||||
|
'Framework :: Flask',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
|
'License :: OSI Approved :: GNU Affero General Public License v3'
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python :: 3 :: Only',
|
'Programming Language :: Python :: 3 :: Only',
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
|
'Programming Language :: Python :: 3.6',
|
||||||
|
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
|
||||||
|
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
|
||||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||||
'License :: OSI Approved :: GNU Affero General Public License v3'
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Reference in a new issue