Fix installation issues

This commit is contained in:
Xavier Bustamante Talavera 2018-06-21 17:39:40 +02:00
parent 3999f3963a
commit eccb4e7d25
5 changed files with 22 additions and 8 deletions

1
MANIFEST.in Normal file
View File

@ -0,0 +1 @@
recursive-include ereuse_devicehub/dummy/files *.yaml

View File

@ -23,6 +23,7 @@ The requirements are:
- Python 3.5 or higher.
- PostgreSQL 9.6 or higher.
- passlib. In debian is ``apt install python3-passlib``.
Install Devicehub with *pip*: `pip3 install ereuse-devicehub -U --pre`.
@ -38,10 +39,15 @@ class MyConfig(DevicehubConfig):
app = Devicehub(MyConfig())
```
Create a PostgreSQL database called *dh-db1*:
Create a PostgreSQL database called *devicehub*:
- In Ubuntu: `# postgres -i` and then `createdb dh-db1`.
- In Debian: `$ createdb dh-db1`
```bash
# su - postgres
postgres $ createdb devicehub
postgres $ psql devicehub
postgres $ GRANT ALL PRIVILEGES ON DATABASE devicehub TO dhub;
postgres $ \q
```
Create the tables in the database by executing in the same directory
where `app.py` is:
@ -63,4 +69,5 @@ for more info.
Devicehub has many commands that allows you to administrate it. You
can, for example, create a dummy database of devices with ``flask dummy``
or create users with ``flask create-user``. See all the
available commands by just executing ``flask``.
available commands by just executing ``flask`` and get more information
per command by executing ``flask command --help``.

View File

@ -30,7 +30,7 @@ class DevicehubConfig(Config):
BenchmarkProcessorSysbenchDef, BenchmarkRamSysbenchDef
}
PASSWORD_SCHEMES = {'pbkdf2_sha256'} # type: Set[str]
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/dh-db1' # type: str
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/devicehub' # type: str
MIN_WORKBENCH = StrictVersion('11.0') # type: StrictVersion
"""
The minimum algorithm_version of eReuse.org Workbench that this Devicehub

2
setup.cfg Normal file
View File

@ -0,0 +1,2 @@
[metadata]
description-file = README.md

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name="ereuse-devicehub",
version='0.2.0a4',
version='0.2.0a5',
packages=find_packages(),
url='https://github.com/ereuse/devicehub-teal',
license='Affero',
@ -15,12 +15,16 @@ setup(
'marshmallow_enum',
'ereuse-utils [Naming]>=0.3.0b2',
'psycopg2-binary',
'sqlalchemy-utils',
'requests',
'requests-toolbelt',
'hashids',
'tqdm',
'click-spinner'
'click-spinner',
'sqlalchemy-utils',
'sqlalchemy-utils [password]',
'sqlalchemy-utils [color]',
'sqlalchemy-utils [babel]',
'PyYAML'
],
tests_requires=[
'pytest',