Skip to content

Commit

Permalink
PROTON-2645: Allow pip to install python binding on Windows
Browse files Browse the repository at this point in the history
The issue seems to be that the python setup.py uses absolute paths to
refer to the C source that is being compiled and these long paths get
propagated to the compiler to refer to the files. In some configurations
the absolute path is too long for the system limits on path length and
the compile fails.

This fix attempts to construct a much shorter relative path to the files
to compile and so not fall foul of the path length restrictions.
  • Loading branch information
astitcher committed Nov 3, 2022
1 parent 1a92a9b commit 3f13a38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def use_bundled_proton(self):
setup_path = os.path.dirname(os.path.realpath(__file__))
base = self.get_finalized_command('build').build_base
build_include = os.path.join(base, 'include')
proton_base = os.path.abspath(os.path.join(setup_path))
proton_base = os.path.relpath(setup_path)
proton_src = os.path.join(proton_base, 'src')
proton_core_src = os.path.join(proton_base, 'src', 'core')
proton_include = os.path.join(proton_base, 'include')
Expand Down

0 comments on commit 3f13a38

Please sign in to comment.