Skip to content

Commit

Permalink
Add piptools/vendored to sys.path on start
Browse files Browse the repository at this point in the history
  • Loading branch information
vphilippon committed Mar 22, 2018
1 parent 4e64f04 commit c54c9f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions piptools/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os
import sys

# Inject vendored directory into system path.
v_path = os.path.abspath(os.path.sep.join([os.path.dirname(os.path.realpath(__file__)), '_vendored']))
sys.path.insert(0, v_path)
2 changes: 2 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Trigger an import of piptools, effectively injecting piptools/_vendored in sys.path
import piptools # noqa

0 comments on commit c54c9f9

Please sign in to comment.