-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from hexagonrecursion/fix104
Fix #104 (path pollution)
- Loading branch information
Showing
7 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ __pycache__/ | |
.tox | ||
.pytest_cache | ||
doc/_build/ | ||
*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""This is a subpackage because the directory is on sys.path for _in_process.py | ||
The subpackage should stay as empty as possible to avoid shadowing modules that | ||
the backend might import. | ||
""" | ||
from os.path import dirname, abspath, join as pjoin | ||
from contextlib import contextmanager | ||
|
||
try: | ||
import importlib.resources as resources | ||
|
||
def _in_proc_script_path(): | ||
return resources.path(__package__, '_in_process.py') | ||
except ImportError: | ||
@contextmanager | ||
def _in_proc_script_path(): | ||
yield pjoin(dirname(abspath(__file__)), '_in_process.py') |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import sys | ||
from setuptools import setup | ||
from os import path, environ, listdir | ||
import json | ||
|
||
children = listdir(sys.path[0]) | ||
out = path.join(environ['PEP517_ISSUE104_OUTDIR'], 'out.json') | ||
with open(out, 'w') as f: | ||
json.dump(children, f) | ||
|
||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters