-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
98 lines (79 loc) · 2.48 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Makefile for https://github.com/Naereen/ParcourSup.py
SHELL=/usr/bin/env /bin/bash
all: tests
# sender
send: send_zamok
send_zamok:
CP --exclude=.git ./_build/html/ ${Szam}publis/ParcourSup.py/
CP --exclude=.git ./notebooks/ ${Szam}publis/ParcourSup.py/notebooks/
# environment
# TODO bring back this!
pypenv:
virtualenv env
source ./env/bin/activate ; type pip python
install: pypenv
source ./env/bin/activate ; pip install -r requirements.txt
install_requirements:
pip3 install -r requirements.txt
# tests and runners
tests: tests_ordreappel tests_propositions tests_donnees_xml
tests_ordreappel:
python3 ./parcoursup/ordreappel/__init__.py
tests_donnees_xml:
cd ./donnees/ ; ./compare_avec_donnees_references.sh --batch
tests_propositions:
python3 ./parcoursup/propositions/__init__.py
tests_behave:
cd tests/ ; make tests
# Cleaner
clean:
-rm -vfr __pycache__/ */__pycache__/ */*/__pycache__/ */*/*/__pycache__/ */*/*/*/__pycache__/
-rm -vf *.pyc */*.pyc */*/*.pyc */*/*/*.pyc */*/*/*/*.pyc */*/*/*/*.pyc
ignorelogs:
git checkout -- logs/
# Linters
# NPROC = `nproc`
# NPROC = 1
NPROC = `getconf _NPROCESSORS_ONLN`
lint:
cd ./parcoursup/ ; pylint -j $(NPROC) *.py */*.py | tee ../logs/pylint_log.txt
cd ./parcoursup/ ; pylint --py3k -j $(NPROC) *.py */*.py | tee ../logs/pylint3_log.txt
# --------------------------------------------------------
# Build and upload to PyPI
build_for_pypi: clean_pypi_build sdist wheel
test_twine:
twine upload --sign --repository testpypi dist/*.whl
twine:
twine upload --sign --repository pypi dist/*.whl
clean_pypi_build:
-mv -vf dist/* parcoursup.egg-info /tmp/
sdist: sdist.zip sdist.tar.gz
sdist.zip:
python3 setup.py sdist --formats=zip
# -gpg --detach-sign -a dist/*.zip
-ls -larth dist/*.zip
sdist.tar.gz:
python3 setup.py sdist --formats=gztar
# -gpg --detach-sign -a dist/*.tar.gz
-ls -larth dist/*.tar.gz
wheel:
python3 setup.py bdist_wheel --universal
# -gpg --detach-sign -a dist/*.whl
-ls -larth dist/*.whl
#-----------------------------------------------------------------
#
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = ParcourSup.py
SOURCEDIR = docs
BUILDDIR = _build
docs: apidoc html
apidoc:
# cd ./parcoursup/ ; sphinx-apidoc -f -o ../docs -e -M .
sphinx-apidoc -f -o ./docs -e -M ./parcoursup/
html:
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-./docs/.fixes_html_in_doc.sh