Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: Add registry configuration #846

Merged
merged 2 commits into from
Mar 16, 2020

Conversation

idbrii
Copy link
Contributor

@idbrii idbrii commented Feb 28, 2020

PEP 514 specifies how python should be added to the registry so
third-party installers, binary packages depending on python (vim), and
pre-compiled binary extension packages (kivy, Pillow, PyGame) can find
python.

I think it also helps resolve python finding 32-bit vs 64-bit
executables.

Seems that python requires the "PythonCore" key. Testing with gvim:
gvim +"py3 print(3)"
crashes with "Scoop" but works with "PythonCore". We're installing
python built by the Python Software Foundation, so it might be matching
that name somewhere inside of python.exe.

Since the manifest uses github urls, it won't work until merged into master. If you want to check it out, I made a testing branch that points to itself.

@idbrii
Copy link
Contributor Author

idbrii commented Feb 28, 2020

Works great on my testing branch:

> scoop uninstall python & scoop install python
Uninstalling 'python' (3.8.2).
'python' was uninstalled.
Installing 'python' (3.8.2) [64bit]
Loading install-pep-514.reg from cache
Checking hash of install-pep-514.reg ... ok.
Loading uninstall-pep-514.reg from cache
Checking hash of uninstall-pep-514.reg ... ok.
Loading python-3.8.2-amd64.exe from cache
Checking hash of python-3.8.2-amd64.exe ... ok.
Running pre-install script...
Running installer script...
Linking ~\scoop\apps\python\current => ~\scoop\apps\python\3.8.2
Creating shim for 'python'.
Creating shim for 'pythonw'.
Creating shim for 'python3'.
Creating shim for 'idle'.
Creating shim for 'idle3'.
'python' (3.8.2) was installed successfully!
Notes
-----
Allow applications and third-party installers to find python by running: C:\Users\idbrii\scoop\apps\python\current\install-pep-514.reg

> gvim +"py3 print(3)"
# 3 is printed to gvim's message area.

bucket/python.json Show resolved Hide resolved
bucket/python.json Show resolved Hide resolved
bucket/python.json Outdated Show resolved Hide resolved
bucket/python.json Outdated Show resolved Hide resolved
bucket/python.json Outdated Show resolved Hide resolved
@Ash258 Ash258 changed the title python: Add .reg so installers find python (#128) python: Add registry configuration Feb 28, 2020
@idbrii idbrii force-pushed the py-registry branch 2 times, most recently from d0017f2 to c39b0f6 Compare February 28, 2020 23:24
bucket/python.json Outdated Show resolved Hide resolved
bucket/python.json Outdated Show resolved Hide resolved
scripts/python/install-pep-514.reg Show resolved Hide resolved
scripts/python/uninstall-pep-514.reg Show resolved Hide resolved
bucket/python.json Outdated Show resolved Hide resolved
bucket/python.json Outdated Show resolved Hide resolved
Fix ScoopInstaller#128.

PEP 514 specifies how python should be added to the registry so
third-party installers, binary packages depending on python (vim), and
pre-compiled binary extension packages (kivy, Pillow, PyGame) can find
python.

I think it also helps resolve python finding 32-bit vs 64-bit
executables.

Seems that python requires the "PythonCore" key. Testing with gvim:
    gvim +"py3 print(3)"
crashes with "Scoop" but works with "PythonCore". We're installing
python built by the Python Software Foundation, so it might be matching
that name somewhere inside of python.exe.

While regedit exports utf-16le, it correctly imports utf8.
Co-Authored-By: Jakub Čábera <cabera.jakub@gmail.com>
@niheaven niheaven merged commit f4b899e into ScoopInstaller:master Mar 16, 2020
@idbrii idbrii deleted the py-registry branch March 16, 2020 23:36
r15ch13 added a commit that referenced this pull request May 14, 2020
Fixes errors introduced by 
#846

closes #1088
closes ScoopInstaller/Scoop#3973
closes #1089
closes #1090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

install python with windows registry
3 participants