Skip to content

Commit 70aec15

Browse files
committed
chore(Makefile): Cleanup
1 parent 751ce4d commit 70aec15

File tree

4 files changed

+46
-7
lines changed

4 files changed

+46
-7
lines changed

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use nix

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ virtualenv
3131
*.prefs
3232
*.mo
3333
/.stfolder
34+
.direnv/

Makefile

+19-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
VIRTUALENV = $(shell pwd)/venv.tmp
2-
PYTHON = $(VIRTUALENV)/bin/python
1+
PYTHON = python
32
ISORT = isort $$(find $(PWD)/allauth -not -path '*/migrations/*' -type f -name '*.py' -not -name '__init__.py' -print)
43

4+
5+
.PHONY: usage
6+
usage:
7+
@echo 'Usage: make [target]'
8+
@echo ''
9+
@echo 'Targets:'
10+
@echo ' black Auto format Python code'
11+
@echo ' isort Fix isort issues'
12+
@echo ' po (Re)generate .po files'
13+
@echo ' mo Compile .po into .mo'
14+
15+
.PHONY: po
516
po:
617
( cd allauth ; $(PYTHON) ../manage.py makemessages -a -e html,txt,py )
718

19+
.PHONY: mo
820
mo:
921
( cd allauth ; $(PYTHON) ../manage.py compilemessages )
1022

11-
isort-fix:
23+
.PHONY: isort
24+
isort:
1225
$(ISORT)
1326

14-
.PHONY: \
15-
po \
16-
mo \
17-
isort-fix
27+
.PHONY: black
28+
black:
29+
black allauth/ setup.py

shell.nix

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
with import <nixpkgs> {};
2+
3+
stdenv.mkDerivation {
4+
name = "django-allauth";
5+
buildInputs = [
6+
black
7+
gettext
8+
isort
9+
python310
10+
python310Packages.django
11+
python310Packages.flake8
12+
python310Packages.pycodestyle
13+
python310Packages.pyls-flake8
14+
python310Packages.pylsp-rope
15+
python310Packages.pytest
16+
python310Packages.pytest-django
17+
python310Packages.python-lsp-server
18+
python310Packages.python3-openid
19+
python310Packages.python3-saml
20+
python310Packages.requests-oauthlib
21+
python310Packages.tox
22+
sphinx
23+
twine
24+
];
25+
}

0 commit comments

Comments
 (0)