Comments (21)
This would make a good candidate for a python.portable package.
from chocolatey-packages.
Sounds like a plan. I only found MSI's for Windows in their releases, so would we use an administrative install? Or is there a zipfile for Python 3.4.3 floating around somewhere?
from chocolatey-packages.
This would make a good candidate for a python.portable package.
I think it would actually be better to just change the install location to $PSScriptRoot
as binRoot is deprecated anyways. No need for a portable package as that would in fact be a duplicate of the existing python packages.
I’d gladly accept a PR for that.
from chocolatey-packages.
binRoot is deprecated anyways
Not yet it isn't. The message is that we will be deprecating it in the future. It's an early heads up, not a warning that it is deprecated.
from chocolatey-packages.
$PSScriptRoot
is not available for POSH v2. That's why the longer method of getting the script root is recommended.
from chocolatey-packages.
LessMSI is a great way to install portables from an MSI. Check out the latest 7zip portable package - https://chocolatey.org/packages/7zip.commandline#files
from chocolatey-packages.
$PSScriptRoot is not available for POSH v2.
I know. I only wrote it here because it’s shorter. 😄
binRoot is deprecated anyways
Not yet it isn't.
Sure, but since Chocolatey eventually got rid of versioned folders there’s no reason left to stick with binRoot.
from chocolatey-packages.
Sure, but since Chocolatey eventually got rid of versioned folders there’s no reason left to stick with binRoot.
It's growing up haha
from chocolatey-packages.
I was thinking more for the idea that python is an installed application, not a portable. It sets things like path and the like. However putting it all in the package folder is also fine.
EDIT FOR CLARIFICATION: Only a portable should go into the package folder. If it is a native installer, it should almost _never_ be installed to the package folder. It can potentially cause too many issues.
from chocolatey-packages.
I'd prefer not to have any Python in my path at all, tbh. I don't like the idea of packages I intend to use from the command line messing with my path and dumping bloat in the registry.
LessMSI seems like the optimal solution for unarchiving the MSI directly into %ChocolateyInstall%\bin
. It doesn't require running as Administrator, unlike the crippled "administrative install", and it doesn't modify the registry. I'd be interested in seeing it applied to other packages that currently install MSIs...
from chocolatey-packages.
To be clear, these would be new packages with the name *.portable. Not everyone thinks the same way as you and I.
from chocolatey-packages.
I feared as much, but a portable python package would still be pretty nice ;)
Does this work?
$packageName = 'python.portable'
$toolsDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
$installDir = Join-Path "$toolsDir" 'python'
$fileName = "$($packageName).msi"
$file = Join-Path "$toolsDir" "$fileName"
$url = 'https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi'
$url64 = 'https://www.python.org/ftp/python/3.4.3/python-3.4.3.amd64.msi'
Get-ChocolateyWebFile "$packageName" "$file" "$url" "$url64"
pushd "$toolsDir"
# the trailing backslash is required!
&lessmsi x "$fileName" "$installDir\"
popd
Not 100% sure about the $installDir
, and there are a bunch of tools named like ./Lib/distutils/command/wininst-10.0.exe
that should be skipped by shimgen, as well as basically everything in ./Lib/site-packages/
.
from chocolatey-packages.
That's pretty close, one can also write out .ignore files on the fly that don't apply. I've built a package or two that does this - see sysinternals.
from chocolatey-packages.
As a result of this "fix" I've got error: "The fully qualified file name must be less than 260 characters". Old c:\tools\python3
was pretty good.
C:\>cup -y python3
Upgrading the following packages:
python3
By upgrading you accept licenses for the packages.
You have python3 v3.4.3.20150501 installed. Version 3.5.0.20151010 is available based on your source(s).
python3 v3.5.0.20151010
Downloading python3 64 bit
from 'https://www.python.org/ftp/python/3.5.0/python-3.5.0-amd64.exe'
Installing python3...
python3 has been installed.
Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
At C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1:24 char:14
+ Get-ChildItem <<<< -Path $destinationFolder -Recurse | Where {
+ CategoryInfo : ReadError: (C:\ProgramData\...am\node_modules:String) [Get-ChildItem], PathTooLongException
+ FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
At C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1:24 char:14
+ Get-ChildItem <<<< -Path $destinationFolder -Recurse | Where {
+ CategoryInfo : ReadError: (C:\ProgramData\...am\node_modules:String) [Get-ChildItem], PathTooLongException
+ FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
The upgrade of python3 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1'.
See log for details.
Chocolatey upgraded 0/1 package(s). 1 package(s) failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
- python3
from chocolatey-packages.
On second review node_modules
in error message direct us to installed nodist
package...
This still is bug in python3 package - "bad" files in other directories should not crash package installation.
Right now workaround is carefully crafted sequence of npm dedup
commands.
from chocolatey-packages.
Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
At C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1:24 char:14
- Get-ChildItem <<<< -Path $destinationFolder -Recurse | Where {
- CategoryInfo : ReadError: (C:\ProgramData...am\node_modules:String) [Get-ChildItem], PathTooLongException
- FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
It's because there is an undefined variable $destinationFolder
in the script when it is generating a list of files for shimgen.exe
to ignore. The variable defaults to $PWD and traverses that path recursively.
This error has been present since version 3.5.0
from chocolatey-packages.
@dtgm would you be in a position to submit a PR to correct this? I would very much appreciate it 😸
from chocolatey-packages.
Related to #106.
from chocolatey-packages.
A python.portable package would be useful.
from chocolatey-packages.
I think per #106 (comment) maybe this one should be closed unless somebody is avoiding the native installer and just copying in the python binaries. A thing to note is you also probably REALLY want the pip.exe shimmed if you do this, otherwise you'll have a lot of pain adding new packages, and Python/pip are going to be looking for site-packages directories in a structure that it won't find if not using the native installer.
from chocolatey-packages.
Yeah, people want c:/PythonXX and with multiple versions.
from chocolatey-packages.
Related Issues (20)
- (musescore) Invalid licenseUrl, faling validation
- (tortoisesvn) outdated HOT 4
- (tixati) 1+ year and 5 releases behind HOT 1
- (vcredist2017) outdated HOT 1
- (becyicongrabber) projectUrl and licenseUrl need amending as site no longer available HOT 3
- (multiple) packages with empty copyright elements
- (totalcommander) No Start Menu entries when deploying via Intune HOT 4
- (cdburnerxp) suggest moving the package to manual HOT 1
- (rdcman) Package includes the full contents of the repository directory instead of just the tools directory.
- (graphviz) Version 10.0.1 is available HOT 2
- (winscp.install) Upgrade on Win11 yields `Cannot convert value to type System.String` HOT 3
- (git) Package for review - can somebody have a look? HOT 1
- (microsoft-vclibs-140-00) Automatic Validation Failed due to Mis-matched Checksum HOT 3
- (diskgenius) New version 5.5.1.1508 is available. HOT 1
- Cygwin sig file removed from repo - package fails 404 HOT 2
- (cmake) Not in Path HOT 22
- (libreoffice-fresh) v24.2 out for ~1.5 months, v7.6.x is now Still HOT 5
- Google Chrome - Checksum error HOT 9
- (nodejs)(nodejs.install) Outdated HOT 4
- (putty.install) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chocolatey-packages.