File tree 3 files changed +23
-7
lines changed
3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,6 @@ jsonschema-*.txt
4
4
relative-json-pointer.html
5
5
relative-json-pointer.pdf
6
6
relative-json-pointer.txt
7
+
8
+ # For the Python enviornment
9
+ .venv
Original file line number Diff line number Diff line change 1
1
XML2RFC ?= xml2rfc
2
+ VENV ?= .venv
2
3
3
4
OUT = \
4
5
jsonschema-core.html jsonschema-core.txt \
5
6
jsonschema-validation.html jsonschema-validation.txt \
6
7
relative-json-pointer.html relative-json-pointer.txt
7
8
8
-
9
- all : $(OUT )
9
+ all : $(VENV ) $(OUT )
10
10
11
11
% .txt : % .xml
12
12
$(XML2RFC ) --text $< -o $@
@@ -25,7 +25,15 @@ json-schema.tar.gz: $(OUT)
25
25
tar -czf json-schema.tar.gz --exclude ' .*' json-schema
26
26
rm -rf json-schema
27
27
28
- clean :
28
+ $(VENV ) : requirements.txt
29
+ python -m venv $@
30
+ $@ /bin/python -m pip install --upgrade pip
31
+ $@ /bin/python -m pip install -r $<
32
+
33
+ spec-clean :
29
34
rm -f $(OUT ) json-schema.tar.gz
30
35
31
- .PHONY : clean all
36
+ clean : spec-clean
37
+ rm -rf $(VENV )
38
+
39
+ .PHONY : spec-clean clean all
Original file line number Diff line number Diff line change @@ -35,11 +35,16 @@ Labels are assigned based on [Sensible Github Labels](https://github.com/Releque
35
35
* links.json - JSON Hyper-Schema's Link Description Object meta-schema
36
36
* hyper-schema-output.json - The recommended output format for JSON Hyper-Schema links
37
37
38
- Install "xml2rfc" using "pip" (https://pypi.org/project/xml2rfc/ ) and type "make" at a shell to build the .txt and .html spec files:
38
+ The Makefile will create the necessary Python venv for you as part of the regular make target.
39
+
40
+ ` make clean ` will remove all output including the venv. To clean just the spec output and
41
+ keep the venv, use ` make spec-clean ` .
42
+
43
+ If you want to run ` xml2rfc ` manually after running make for the first time, you will
44
+ need to activate the virtual environment:
39
45
40
46
``` sh
41
- pip install --requirement requirements.txt
42
- make
47
+ source .venv/bin/activate
43
48
```
44
49
45
50
The version of "xml2rfc" that this project uses is updated by modifying ` requirements.in ` and running ` pip-compile requirements.in ` .
You can’t perform that action at this time.
0 commit comments