qgis / QGIS-Mac-Packager

Scripts for Official QGIS MacOS Packages
https://www.qgis.org
GNU General Public License v2.0
54 stars 21 forks source link

pip malformed in nightly2 #78

Closed AndrewAnnex closed 3 years ago

AndrewAnnex commented 3 years ago

in latest nightly2 build the pip, pip3, and pip3.7 files in Contents/MacOS/bin looks like:

#!/usr/bin/perl -e$_=$ARGV[0];s/[^/]+$/python3/;exec($_,@ARGV)
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==20.0.2','console_scripts','pip'
__requires__ = 'pip==20.0.2'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('pip==20.0.2', 'console_scripts', 'pip')()
    )

and does not work accordingly, my guess is that there is some typo or issue with the homebrew build

edit confusingly the system level environment is leaked into the nightly2 python, as a number of dependencies I wanted to pip install were already installed without me doing anything, I can look into the environment variables to look for anything obvious, but this is against the expectation that these qgis packages are isolated from the system level environment.

PeterPetrik commented 3 years ago

there is plenty of stuff already installed, check for example https://qgis.org/downloads/macos/nightly2/qgis_nightly2_master_20200824_132900.deps

what exactly is not working? the #!/usr/bin/perl -e$_=$ARGV[0];s/[^/]+$/python3/;exec($_,@ARGV) should pick the python3 packages in the QGIS bundle and it should work ... ? Any particular error or anything?

AndrewAnnex commented 3 years ago

@PeterPetrik the specific error running it unmodified is:

Unknown regexp modifier "/y" at -e line 1, at end of line
Unknown regexp modifier "/t" at -e line 1, at end of line
Unknown regexp modifier "/h" at -e line 1, at end of line
Unknown regexp modifier "/n" at -e line 1, at end of line
Unknown regexp modifier "/3" at -e line 1, at end of line
Final $ should be \$ or $name at -e line 1, within string
syntax error at -e line 1, near ";s/[^/]+$/python3"
Execution of -e aborted due to compilation errors.

the perl version I have is v5.32.0

okay I am guessing then there is no environment leak based on the deps installed in that log.