File tree 3 files changed +17
-1
lines changed
3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,5 @@ clean :
19
19
20
20
requirements.txt : requirements.in setup.py
21
21
pip-compile -v requirements.in
22
+ ./make_paths_relative.py < requirements.txt > requirements.tmp
23
+ mv requirements.tmp $@
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ import os
3
+ import re
4
+ import sys
5
+
6
+ pattern = re .compile (r"\s*-e\s+file://(?P<path>.*?)\n" )
7
+ inputs = sys .stdin .readlines ()
8
+ for line in inputs :
9
+ match = pattern .match (line )
10
+ if match :
11
+ path = match .group ("path" )
12
+ path = os .path .relpath (path )
13
+ line = f"-e { path } \n "
14
+ sys .stdout .write (line )
Original file line number Diff line number Diff line change 4
4
#
5
5
# pip-compile --output-file requirements.txt requirements.in
6
6
#
7
- -e file:///Users/till/git/pythonflow
7
+ -e .
8
8
alabaster == 0.7.12 # via sphinx
9
9
astroid == 1.6.5 # via pylint
10
10
atomicwrites == 1.3.0 # via pytest
You can’t perform that action at this time.
0 commit comments