Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Chocolatey distribution #482

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

Open
Tset-Noitamotua opened this issue Feb 2, 2017 · 6 comments
Open

Chocolatey distribution #482

Tset-Noitamotua opened this issue Feb 2, 2017 · 6 comments

Comments

@Tset-Noitamotua
Copy link

Hey, great project!

You may consider distribution through chocolatey.

Cheers
Tset

@stonebig
Copy link
Contributor

stonebig commented Feb 2, 2017

Nuggets , chocolatey are words I heard, but I don't know the benefits, an even less the cost (in man hours).

Can you elaborate on these two topics, as you may have some experience ?

@Tset-Noitamotua
Copy link
Author

There are some possible benefits

  • it's like brew on the Mac and apt-get on linux
    • package managers make installing and updating stuff more convinient
  • one could get winpython with just one command like choco install winpython
    • instead of downloading it manually and copy to usb / harddrive
  • it allows user to easily integrate winpython in their automatic provisioning scrips
    • e.g. have them on Github as a Gist
  • chocolatey and nugget are very popular thus you may reach more potential users
  • for more check ' why chocolatey?

required effort

  • I have never created or maintained a choco package myself but I assume the required effort is not very big especially in case of a portalbe application
  • may be @ferventcoder who is an experienced package creater and maintainer can provide some insights about this topic?

@ferventcoder
Copy link

ferventcoder commented Feb 3, 2017

To give you an idea (this is just the 3.6.0.1 QT builds):

  • tools\chocolateyInstall.ps1:
$ErrorActionPreference = 'Stop';
$packageName  = 'winpython'
$toolsDir     = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$packageArgs = @{
  packageName   = $packageName
  softwareName  = 'WinPython*'
  fileType      = 'exe'
  silentArgs    = "/S"
  validExitCodes= @(0)
  url           = "https://sourceforge.net/projects/winpython/files/WinPython_3.6/3.6.0.1/WinPython-32bit-3.6.0.1Qt5.exe/download"
  checksum      = 'C5ACDFBFB57EDBC395CCE053BAD807DB61335FB1CD7ABF5F209ED474B5374C2F'
  checksumType  = 'sha256'
  url64bit      = "https://sourceforge.net/projects/winpython/files/WinPython_3.6/3.6.0.1/WinPython-64bit-3.6.0.1Qt5.exe/download"
  checksum64    = 'A9C6ED5983711D21B96FAF1D4AB4178ECAA0D4A4612FF0415C11F46B69495B48'
  checksumType64= 'sha256'
}

Install-ChocolateyPackage @packageArgs

winpython.nuspec:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
  <metadata>
    <!-- == PACKAGE SPECIFIC SECTION == -->
    <!-- This section is about this package, although id and version have ties back to the software -->
    <id>winpython</id>
    <version>3.6.0.1</version>
    <owners>WinPython</owners>
    <!-- ============================== -->

    <!-- == SOFTWARE SPECIFIC SECTION == -->
    <!-- This section is about the software itself -->
    <title>WinPython (Install)</title>
    <authors>Pierre Raybaut,  Winpython development team</authors>
    <projectUrl>http://winpython.github.io/</projectUrl>
    <iconUrl>https://raw.githubusercontent.com/winpython/winpython/master/winpython/images/winpython.svg</iconUrl>
    <copyright>2012-2013 Pierre Raybaut, 2014-2017 The Winpython development team</copyright>
    <licenseUrl>https://github.com/winpython/winpython/blob/master/LICENSE</licenseUrl>
    <requireLicenseAcceptance>true</requireLicenseAcceptance>
    <projectSourceUrl>https://github.com/winpython/winpython</projectSourceUrl>
    <bugTrackerUrl>https://github.com/winpython/winpython/issues</bugTrackerUrl>
    <tags>python</tags>
    <summary>WinPython is a portable distribution of the Python programming language for Windows.</summary>
    <description>WinPython is a portable distribution of the Python programming language for Windows (http://winpython.github.io).

This is the winpython Python package, not the distribution itself. It includes two main features:

#### WinPython Package Manager (WPPM)
* let you install/uninstall to your WinPython distribution any standard Python package built with distutils (e.g. dummypackage-2.1.win-amd64-py3.4.‌exe) or with wheels (e.g. dummypackage-2.1-py2.py3-none-any.whl)

#### WinPython build toolchain
* make.py is the script used to build a WinPython distribution from (almost) scratch. </description>
    <releaseNotes>https://github.com/winpython/winpython/blob/master/changelogs/WinPythonQt5-3.6.0.1_History.md</releaseNotes>
    <!-- =============================== -->  
  </metadata>
  <files>
    <file src="tools\**" target="tools" />
  </files>
</package>

@ferventcoder
Copy link

ferventcoder commented Feb 3, 2017

Here is the nupkg (added .zip extension) to give you an idea of what it looks like - winpython.3.6.0.1.nupkg.zip

A nupkg is a fancy form of a compressed zip archive, so you can simply unzip it just as is and take a look at what is there. The two files I shared above are the only two files that you want as the rest is generated by the packaging.

@ferventcoder
Copy link

You could also include the binaries in the packaging, but I saw they were well over the 150MB limit that the community package repository has for including the binaries in the packaging itself.

@stonebig
Copy link
Contributor

hi all. thanks @ferventcoder for the explanation. I may kick it a shot, when I will have finished dropping all legacy bagage: 2.7/3.4/Qt4/32bit

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

No branches or pull requests

3 participants