forked from lgoodridge/django-uniauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (40 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Makefile
ENV?=
clean:
rm -f *.pyc
# Formats the code with black and isort
format:
python3.10 -m isort uniauth/
python3.10 -m black uniauth/
python3.10 -m isort tests/
python3.10 -m black tests/
# Perform initial developer setup
# You will still need to setup tox to work with multiple
# python environements, perhaps with pyenv
install:
pip install -r requirements.txt
pip install tox
# Install formatting tools in python3.10 environment
# Requires having python3.10 setup, perhaps with pyenv
install-formatter:
pip3.10 install black
pip3.10 install isort
# Create migrations
# Requires having the demo_app set up
migrations:
cd demo_app; python manage.py makemigrations
# Run all tests
test:
tox
# Test a specific environment
# e.g. make test-env ENV=py39-django40
test-env:
tox -e ${ENV}
# Run after a dependency / supported verion update
# to recreate test environments
test-recreate:
tox -r
# Upload a new build to pypi
upload_pypi: clean
python setup.py sdist bdist_wheel
twine upload dist/* --skip-existing