Skip to content

Commit d1ed47d

Browse files
committed
Black format python code.
1 parent c72e148 commit d1ed47d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ Tip: use the latest version of python you have available.
2222
### Notes
2323
- Conda environments may experience issues installing with `ssl` DLL issues.
2424
See this [StackOverflow resource](https://stackoverflow.com/questions/54175042/python-3-7-anaconda-environment-import-ssl-dll-load-fail-error/60405693#60405693)
25+
and this repository's corresponding [GitHub Issue](https://github.com/cooperjaXC/windows-python-venv/issues/4)
2526
for more help.

setup.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import ensurepip
2828

2929
# Use __file__ if it's defined, otherwise default to the current working directory
30-
py_venv_dir = Path(__file__).parent if '__file__' in locals() else Path('.')
30+
py_venv_dir = Path(__file__).parent if "__file__" in locals() else Path(".")
3131
# Construct the path to the 'venv' directory relative to the script's location
3232
VENV_PATH = py_venv_dir / "venv"
3333
VENV_PATH = VENV_PATH.resolve()
@@ -171,7 +171,8 @@ def main() -> None:
171171
# The requirements.txt file defaults to being located inside the "./py_venv" directory.
172172
# # This is so that the user can find the full requirements readout after the venv is created,
173173
# # but it is not confusingly included at the project-level directory.
174-
requirements_txt_path = py_venv_dir / "requirements.txt" # Path("./py_venv/requirements.txt")
174+
# requirements_txt_path = Path("./py_venv/requirements.txt")
175+
requirements_txt_path = py_venv_dir / "requirements.txt"
175176
# Search for existing instances of `requirements.txt`
176177
if not requirements_txt_path.exists():
177178
# The root directory will become the default location for the requirements.txt whether it exists or not.
@@ -189,7 +190,9 @@ def main() -> None:
189190
# print(f"\nExecuting venv creation command: {command}")
190191
run(command)
191192
# print(f"\nExecuting activate venv command: {activate}\n")
192-
run(f"{activate} python -m pip install --upgrade pip setuptools wheel pip-tools")
193+
run(
194+
f"{activate} python -m pip install --upgrade pip setuptools wheel pip-tools"
195+
)
193196
except subprocess.CalledProcessError:
194197
# There is an issue establishing the venv.
195198
# # With ArcGIS Pro base python interpreters, this often has to do with the ensurepip pip wheel.
@@ -208,7 +211,7 @@ def main() -> None:
208211
f'{activate} python "{whl}"/pip install --upgrade pip setuptools wheel pip-tools'
209212
)
210213
# print("Made it to the Activate stage")
211-
pip_install_command = f"{activate}python -m pip install -r \"{requirements_in_path}\""
214+
pip_install_command = f'{activate}python -m pip install -r "{requirements_in_path}"'
212215
print(f"\nExecuting pip install command: {pip_install_command}\n")
213216
run(pip_install_command)
214217
run(f'{activate} python -m pip freeze > "{requirements_txt_path}"')

0 commit comments

Comments
 (0)