Skip to content

Commit

Permalink
Merge pull request #39 from logan-pugh/python-3-11
Browse files Browse the repository at this point in the history
Update for Pro 3.3.x and Python 3.11
  • Loading branch information
mhw-at-yg authored Aug 28, 2024
2 parents 846f0a8 + b3bdffc commit 93b5ae6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions archook/archook.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,13 @@ def get_pro_paths():
PRO_WIN_PATHS = inspect.cleandoc(
r"""
{C}
{C}\Library\mingw-w64
{C}\Library\usr\bin
{C}\Library\bin
{C}\Scripts
{P}\Python\Scripts
{P}\bin
""".format(C=C, P=P))
PRO_SYSPATHS = inspect.cleandoc(
r"""
{C}
{C}\python36.zip
{C}\python311.zip
{C}\DLLs
{C}\lib
{C}\lib\site-packages
Expand Down Expand Up @@ -148,10 +144,9 @@ def get_arcpy(pro=False):
# pro_conda_dir = locate_pro_conda()

winpaths, syspaths = get_pro_paths()
# update Windows PATH
wp = os.environ["PATH"].split(";") # save incoming path
[wp.insert(0, x) for x in winpaths] # prepend our new syspath
os.environ["PATH"] = ";".join(wp) # write back to environment
# Explicitly add directories to DLL search path. Refer to https://docs.python.org/3/library/os.html#os.add_dll_directory
for wp in winpaths:
os.add_dll_directory(wp)
# update sys.path
[sys.path.insert(0, x) for x in syspaths]

Expand Down

0 comments on commit 93b5ae6

Please sign in to comment.