mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Migrate "mysql" and "postgresql" targets
This commit is contained in:
parent
af50e29e2c
commit
f5fd0fc5be
10
Makefile
10
Makefile
@ -11,16 +11,6 @@ clean:
|
||||
superuser:
|
||||
cd InvenTree && python3 manage.py createsuperuser
|
||||
|
||||
# Install pre-requisites for mysql setup
|
||||
mysql:
|
||||
sudo apt-get install mysql-server libmysqlclient-dev
|
||||
pip3 install mysqlclient
|
||||
|
||||
# Install pre-requisites for postgresql setup
|
||||
postgresql:
|
||||
sudo apt-get install postgresql postgresql-contrib libpq-dev
|
||||
pip3 install psycopg2
|
||||
|
||||
# Install packages required to generate code docs
|
||||
docreqs:
|
||||
pip3 install -U -r docs/requirements.txt
|
||||
|
22
tasks.py
22
tasks.py
@ -200,3 +200,25 @@ def coverage(c):
|
||||
|
||||
# Generate coverage report
|
||||
c.run('coverage html')
|
||||
|
||||
@task
|
||||
def mysql(c):
|
||||
"""
|
||||
Install packages required for using InvenTree with a MySQL database.
|
||||
"""
|
||||
|
||||
print('Installing packages required for MySQL')
|
||||
|
||||
c.run('sudo apt-get install mysql-server libmysqlclient-dev')
|
||||
c.run('pip3 install mysqlclient')
|
||||
|
||||
@task
|
||||
def postgresql(c):
|
||||
"""
|
||||
Install packages required for using InvenTree with a PostgreSQL database
|
||||
"""
|
||||
|
||||
print("Installing packages required for PostgreSQL")
|
||||
|
||||
c.run('sudo apt-get install postgresql postgresql-contrib libpq-dev')
|
||||
c.run('pip3 install psycopg2')
|
||||
|
Loading…
Reference in New Issue
Block a user