File tree Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,6 @@ jsonschema-*.txt
44relative-json-pointer.html
55relative-json-pointer.pdf
66relative-json-pointer.txt
7+
8+ # For the Python enviornment
9+ .venv
Original file line number Diff line number Diff line change 11XML2RFC ?= xml2rfc
2+ VENV ?= .venv
23
34OUT = \
45 jsonschema-core.html jsonschema-core.txt \
56 jsonschema-validation.html jsonschema-validation.txt \
67 relative-json-pointer.html relative-json-pointer.txt
78
8-
9- all : $(OUT )
9+ all : $(VENV ) $(OUT )
1010
1111% .txt : % .xml
1212 $(XML2RFC ) --text $< -o $@
@@ -25,7 +25,15 @@ json-schema.tar.gz: $(OUT)
2525 tar -czf json-schema.tar.gz --exclude ' .*' json-schema
2626 rm -rf json-schema
2727
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 :
2934 rm -f $(OUT ) json-schema.tar.gz
3035
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
3535 * links.json - JSON Hyper-Schema's Link Description Object meta-schema
3636 * hyper-schema-output.json - The recommended output format for JSON Hyper-Schema links
3737
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:
3945
4046``` sh
41- pip install --requirement requirements.txt
42- make
47+ source .venv/bin/activate
4348```
4449
4550The 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