You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, when I include buildstock_query in an environment via inclusion in a setup.py file for another project, the long file names in the repo prevent the file from being checked out because they exceed the Windows 256 character max file path length.
Current Behavior
Add buildstock_query to setup.py via clone from github:
Instead of a successful checkout and installation into the environment, we get this error:
(comstockpostproc_bsquery) C:\GitRepos\ComStock\postprocessing>pip install -e .[dev]
Obtaining file:///C:/GitRepos/ComStock/postprocessing
Preparing metadata (setup.py) ... done
Collecting buildstock_query@ git+https://github.com/NREL/buildstock-query
Cloning https://github.com/NREL/buildstock-query to c:\users\aparker\appdata\local\temp\1\pip-install-zsepkhz9\buildstock-query_4223d444187d422281d02d17f8702ab4
Running command git clone --filter=blob:none --quiet https://github.com/NREL/buildstock-query 'C:\Users\aparker\AppData\Local\Temp\1\pip-install-zsepkhz9\buildstock-query_4223d444187d422281d02d17f8702ab4'
error: unable to create file tests/reference_files/('small_run_baseline_20230810_100_baseline', 'small_run_category_1_20230616_timeseries', 'small_run_category_1_20230616_upgrades')_query_cache.pkl: Filename too long
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Expected Behavior
Successful checkout and installation into the environment.
Possible Solution
Make the committed filenames shorter. The max filepath length on Windows is 256 characters.
The temporary root directory created by pip install is 108 characters long:
Issue overview
On Windows, when I include buildstock_query in an environment via inclusion in a
setup.py
file for another project, the long file names in the repo prevent the file from being checked out because they exceed the Windows 256 character max file path length.Current Behavior
Add
buildstock_query
tosetup.py
via clone from github:Instead of a successful checkout and installation into the environment, we get this error:
Expected Behavior
Successful checkout and installation into the environment.
Possible Solution
Make the committed filenames shorter. The max filepath length on Windows is 256 characters.
The temporary root directory created by
pip install
is 108 characters long:This leaves 256 - 108 = 148 characters for the repo to use in file paths.
The file path below is the longest in the repo at 168 characters, which exceeds the 148 character limit:
The next-longest filepaths are only 90 characters, so they are ok because they are below the 148 character limit:
Environment
Windows, installing into a Conda environment via
pip install -e .[dev]
The text was updated successfully, but these errors were encountered: