Cool Stuff
This commit is contained in:
parent
ec0bd91195
commit
a585fef02e
|
@ -0,0 +1,14 @@
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: debian
|
||||||
|
commands:
|
||||||
|
- echo "HALLO WELT, KANNST DU MICH HÖREN"
|
||||||
|
when:
|
||||||
|
event: [push, tag]
|
||||||
|
|
||||||
|
package:
|
||||||
|
image: debian
|
||||||
|
command:
|
||||||
|
- "zap"
|
||||||
|
when:
|
||||||
|
event: tag
|
51
LICENSE
51
LICENSE
|
@ -1,39 +1,20 @@
|
||||||
The SFL License Agreement
|
MIT License
|
||||||
|
|
||||||
This license agreement covers your use of the iMatix STANDARD FUNCTION LIBRARY (SFL), its source code, documentation, and executable files, hereinafter referred to as "the Product".
|
Copyright (c) 2021 Kevin Dorner
|
||||||
|
|
||||||
The Product is Copyright (c) 1991-2000 iMatix Corporation. You may use it and distribute it according to this following License Agreement. If you do not agree with these terms, please remove the Product from your system. By incorporating the Product in your work or distributing the Product to others you implicitly agree to these license terms.
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
Statement Of Copyright
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
The Product is, and remains, Copyright © 1991-2000 iMatix Corporation, with exception of specific copyrights as noted in the individual source files.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
Conditions Of Use
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||||
|
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
You do not need to provide the source code for the Product as part of your product. However, you must do one of these things to comply with the Product License Agreement:
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||||
|
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
1. Provide the source code for Product modules that you use, or
|
|
||||||
2. Make your product freely available according to a license similar to the GNU General Public License, or the Perl Artistic License, or
|
|
||||||
3. Add this phrase to the documentation for your product: "This product uses parts of the iMatix SFL, Copyright © 1991-2000 iMatix Corporation <http://www.imatix.com>".
|
|
||||||
|
|
||||||
Rights Of Usage
|
|
||||||
|
|
||||||
You may freely and at no cost use the Product in any project, commercial, academic, military, or private, so long as you respect the License Agreement. The License Agreement does not affect any software except the Product. In particular, any application that uses the Product does not itself fall under the License Agreement.
|
|
||||||
|
|
||||||
You may modify any part of the Product, including sources and documentation, except this License Agreement, which you may not modify.
|
|
||||||
|
|
||||||
You must clearly indicate any modifications at the start of each source file. The user of any modified Product code must know that the source file is not original.
|
|
||||||
|
|
||||||
At your discretion, you may rewrite or reuse any part of the Product so that your derived code is not obviously part of the Product. This derived code does not fall under the Product License Agreement directly, but you must include a credit at the start of each source file indicating the original authorship and source of the code, and a statement of copyright as follows:"Parts copyright (c) 1991-2000 iMatix Corporation."
|
|
||||||
|
|
||||||
Rights Of Distribution
|
|
||||||
|
|
||||||
You may freely distribute the Product, or any subset of the Product, by any means. The License, in the form of the file called "LICENSE.TXT" must accompany any such distribution.
|
|
||||||
|
|
||||||
You may charge a fee for distributing the Product, for providing a warranty on the Product, for making modifications to the Product, or for any other service provided in relation to the Product. You are not required to ask our permission for any of these activities.
|
|
||||||
|
|
||||||
At no time will iMatix associate itself with any distribution of the Product except that supplied from the Internet site http://www.imatix.com.
|
|
||||||
|
|
||||||
Disclaimer Of Warranty
|
|
||||||
|
|
||||||
The Product is provided as free software, in the hope that it will be useful. It is provided "as-is", without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Product is with you. Should the Product prove defective, the full cost of repair, servicing, or correction lies with you.
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
#Config
|
||||||
|
UPSTREAM_VERSION = 3.9.2
|
||||||
|
PKG_SUB_RELEASE = 1.0
|
||||||
|
PKG_FULL_VERSION = ${UPSTREAM_VERSION}-${PKG_SUB_RELEASE}
|
||||||
|
|
||||||
|
SOURCE = https://www.python.org/ftp/python/${UPSTREAM_VERSION}/python-${UPSTREAM_VERSION}-amd64.exe
|
||||||
|
CHECKSUM = efb20aa1b648a2baddd949c142d6eb06
|
||||||
|
## Download Link and Checksums can be found on https://www.python.org/downloads/windows/
|
||||||
|
|
||||||
|
all: clean install
|
||||||
|
|
||||||
|
install: setversion
|
||||||
|
@[ -d "./data/" ] || mkdir ./data/
|
||||||
|
@echo "INFO: Downloading the Git for Windows executable..."
|
||||||
|
@wget -O ./data/python-${UPSTREAM_VERSION}-amd64.exe ${SOURCE}
|
||||||
|
@echo "${CHECKSUM} ./data/python-${UPSTREAM_VERSION}-amd64.exe" | md5sum -c && echo "SUCCESS: Checksums match" || { ec=$$?; echo "ERROR: Checksum mismatch" >&2; rm -rf ./data/ >&2; exit $$ec; }
|
||||||
|
@echo "SUCCESS: Installed Successfully"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo "INFO: Cleaning ./data/"
|
||||||
|
@rm -rf ./data/
|
||||||
|
@[ ! -d "./data/" ] && echo "SUCCESS: Cleaned"
|
||||||
|
|
||||||
|
setversion:
|
||||||
|
@echo "INFO: Writing version ${PKG_FULL_VERSION} to control file"
|
||||||
|
@sed -i "s/^version: [0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$$/version: ${UPSTREAM_VERSION}/" ./control
|
||||||
|
@sed -i "s/^packageVersion: [0-9]\{1,3\}\.[0-9]\{1,3\}$$/packageVersion: ${PKG_SUB_RELEASE}/" ./control
|
||||||
|
package:
|
||||||
|
@echo "MEEP!"
|
||||||
|
.PHONY: all install clean setversion package
|
||||||
|
|
29
README.md
29
README.md
|
@ -1,2 +1,29 @@
|
||||||
# CI-Test
|
# mdg-python
|
||||||
|
A better Python for Windows OPSI package aimed to work with IServ
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- Latest Python version
|
||||||
|
- Slim and simple package
|
||||||
|
- Automated Python package installation through pip
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
This package only supports **Microsoft Windows 10 64bit**
|
||||||
|
|
||||||
|
## Manual Installation
|
||||||
|
### Method 1: Git
|
||||||
|
0. Install git and make as root user
|
||||||
|
```sh
|
||||||
|
apt install git make
|
||||||
|
```
|
||||||
|
1. Clone the repository
|
||||||
|
```sh
|
||||||
|
git clone --depth 1 https://gitea.mdg-hamburg.de/MDG-Packages/winst-mdg-python.git /srv/deploy/install/mdg-python/
|
||||||
|
```
|
||||||
|
2. Download the required binaries
|
||||||
|
```sh
|
||||||
|
cd /srv/deploy/install/mdg-python/ && make
|
||||||
|
```
|
||||||
|
3. Run chkdeploy to make IServ aware of the new package
|
||||||
|
```sh
|
||||||
|
chkdeploy
|
||||||
|
```
|
|
@ -0,0 +1,37 @@
|
||||||
|
[Product]
|
||||||
|
type: localboot
|
||||||
|
id: mdg-python
|
||||||
|
name: MDG Python
|
||||||
|
description: Python für Microsoft Windows mit pip-Unterstützung
|
||||||
|
advice: Vereinfachtes Paket mit neuer Python-Version und funktionsfähiger pip-Unterstützung
|
||||||
|
version: 3.9.2
|
||||||
|
packageVersion: 1.0
|
||||||
|
setupScript: install.ins
|
||||||
|
uninstallScript: remove.ins
|
||||||
|
|
||||||
|
[ProductProperty]
|
||||||
|
name: shortcut
|
||||||
|
type: bool
|
||||||
|
description: Startmenü Verknüpfungen erstellen
|
||||||
|
default: True
|
||||||
|
|
||||||
|
[ProductProperty]
|
||||||
|
name: associatefiles
|
||||||
|
type: bool
|
||||||
|
description: Assoziere Python-Dateiendungen
|
||||||
|
helptext: Zu den Python-Dateiendungen gehören u. a. ".py", ".pyw", ".pyc". Doppelklick auf Python-Dateien im Windows-Explorer nutzt dann den Python-Launcher.
|
||||||
|
default: True
|
||||||
|
|
||||||
|
[ProductProperty]
|
||||||
|
name: prependpath
|
||||||
|
type: bool
|
||||||
|
description: Python zum PATH hinzufügen
|
||||||
|
helptext: Fügt Python selbst und zugehörige Skripte zum systemweiten PATH hinzu. Dies erlaubt das direkte Verwenden von Python-Werkzeugen in der Kommandozeile.
|
||||||
|
default: True
|
||||||
|
|
||||||
|
[ProductProperty]
|
||||||
|
name: pippackages
|
||||||
|
type: unicode
|
||||||
|
description: Installiere pip Pakete
|
||||||
|
helptext: Die Pakete werden mit jeder Installation des Programms installiert oder aktualisiert. Zum Hinzufügen von neuen Pakten kann einfach eine Neuinstallation vorgenommen werden. Die Pakete werden mit einem Leerzeichen getrennt und können auf https://pypi.org/ gefunden werden. Diese Pakete werden systemweit installiert. Durch Nutzer installierte Pakete werden im jeweiligen Appdata Verzeichnis installiert.
|
||||||
|
pattern: numpy scikit-learn rsa
|
|
@ -0,0 +1,85 @@
|
||||||
|
[Initial]
|
||||||
|
Message=Installiere Python...
|
||||||
|
DefVar $Version$
|
||||||
|
DefVar $ExitCode$
|
||||||
|
DefVar $AssociateFiles$
|
||||||
|
DefVar $AssociateFilesArguments$
|
||||||
|
DefVar $CreateShortcut$
|
||||||
|
DefVar $ShortcutArgument$
|
||||||
|
DefVar $PrependPath$
|
||||||
|
DefVar $PrependPathArgument$
|
||||||
|
DefVar $PackageList$
|
||||||
|
|
||||||
|
[Aktionen]
|
||||||
|
ShowBitmap "%ScriptPath%\logo.png" "MDG Python"
|
||||||
|
Sub_GetProperties
|
||||||
|
Sub_ConfigureProperties
|
||||||
|
WinBatch_Uninstall
|
||||||
|
Files_Cleanup
|
||||||
|
WinBatch_Setup
|
||||||
|
WinBatch_UpdatePip
|
||||||
|
Sub_CheckPackages
|
||||||
|
Sub_HandleExitCode
|
||||||
|
|
||||||
|
[Sub_GetProperties]
|
||||||
|
Set $Version$ = GetValue("productversion", GetProductMap)
|
||||||
|
Set $AssociateFiles$ = GetProductProperty("associatefiles", "true")
|
||||||
|
Set $CreateShortcut$ = GetProductProperty("shortcut", "true")
|
||||||
|
Set $PrependPath$ = GetProductProperty("prependpath", "true")
|
||||||
|
Set $PackageList$ = GetProductProperty("pippackages", "")
|
||||||
|
|
||||||
|
[Sub_ConfigureProperties]
|
||||||
|
if ($AssociateFiles$ = "true")
|
||||||
|
Set $AssociateFilesArguments$ = "AssociateFiles=1"
|
||||||
|
else
|
||||||
|
Set $AssociateFilesArguments$ = "AssociateFiles=0"
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ($CreateShortcut$ = "true")
|
||||||
|
Set $ShortcutArgument$ = "Shortcuts=1"
|
||||||
|
else
|
||||||
|
Set $ShortcutArgument$ = "Shortcuts=0"
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ($PrependPath$ = "true")
|
||||||
|
Set $PrependPathArgument$ = "PrependPath=1"
|
||||||
|
else
|
||||||
|
Set $PrependPathArgument$ = "PrependPath=0"
|
||||||
|
endif
|
||||||
|
|
||||||
|
[WinBatch_Uninstall]
|
||||||
|
; First uninstall Python due to an upstream issue with the installer on existing installations: https://bugs.python.org/issue41800
|
||||||
|
"%ScriptPath%\data\python-$Version$-amd64.exe" /quiet /uninstall
|
||||||
|
|
||||||
|
[Files_Cleanup]
|
||||||
|
; This ensures all data has been removed
|
||||||
|
delete -sf "%ProgramFiles64Dir%\python39\"
|
||||||
|
|
||||||
|
[WinBatch_Setup]
|
||||||
|
; https://docs.python.org/3/using/windows.html#installing-without-ui
|
||||||
|
"%ScriptPath%\data\python-$Version$-amd64.exe" /passive InstallAllUsers=1 InstallLauncherAllUsers=1 $AssociateFilesArguments$ $ShortcutArgument$ $PrependPathArgument$ /log "%opsiLogDir%\python-install.log"
|
||||||
|
|
||||||
|
[WinBatch_UpdatePip]
|
||||||
|
"%ProgramFiles64Dir%\python39\python.exe" -m pip install --upgrade pip
|
||||||
|
|
||||||
|
[Sub_CheckPackages]
|
||||||
|
if not($PackageList$ = "")
|
||||||
|
WinBatch_Packages
|
||||||
|
endif
|
||||||
|
|
||||||
|
[WinBatch_Packages]
|
||||||
|
"%ProgramFiles64Dir%\python39\Scripts\pip.exe" install -U $PackageList$
|
||||||
|
|
||||||
|
[Sub_HandleExitCode]
|
||||||
|
; check return code
|
||||||
|
Set $ExitCode$ = GetLastExitCode
|
||||||
|
comment "GetLastExitCode: " + $ExitCode$
|
||||||
|
if not($ExitCode$ = "0" or $ExitCode$ = "3010" or $ExitCode$ = "2359302" or $ExitCode$ = "2359297")
|
||||||
|
; 0 ERROR_SUCCESS
|
||||||
|
; 3010 ERROR_SUCCESS_REBOOT_REQUIRED
|
||||||
|
; List of WUSA ExitCodes: https://support.microsoft.com/en-us/kb/938205
|
||||||
|
; 2359297 (WUSA ExitCode, Hex: 0x240001) WU_S_SERVICE_STOP
|
||||||
|
; 2359302 (WUSA ExitCode, Hex: 0x00240006) WU_S_ALREADY_INSTALLED
|
||||||
|
LogError "Fatal: setup returned exit code " + $ExitCode$
|
||||||
|
IsFatalError
|
||||||
|
endif
|
|
@ -0,0 +1,31 @@
|
||||||
|
[Initial]
|
||||||
|
Message=Deinstalliere Python...
|
||||||
|
DefVar $ExitCode$
|
||||||
|
DefVar $Version$
|
||||||
|
|
||||||
|
[Aktionen]
|
||||||
|
ShowBitmap "%ScriptPath%\logo.png" "MDG Python"
|
||||||
|
Sub_PrepareSetup
|
||||||
|
WinBatch_Setup
|
||||||
|
Files_Cleanup
|
||||||
|
|
||||||
|
[Sub_PrepareSetup]
|
||||||
|
Set $Version$ = GetValue("productversion", GetProductMap)
|
||||||
|
|
||||||
|
[WinBatch_Setup]
|
||||||
|
"%ScriptPath%\data\python-$Version$-amd64.exe" /quiet /uninstall
|
||||||
|
|
||||||
|
[Files_Cleanup]
|
||||||
|
delete -sf "%ProgramFiles64Dir%\Python39\"
|
||||||
|
|
||||||
|
[Sub_HandleExitCode]
|
||||||
|
; check return code
|
||||||
|
Set $ExitCode$ = GetLastExitCode
|
||||||
|
comment "GetLastExitCode: " + $ExitCode$
|
||||||
|
if not($ExitCode$ = "0" or $ExitCode$ = "1605" or $ExitCode$ = "3010")
|
||||||
|
; 0 ERROR_SUCCESS
|
||||||
|
; 1605 ERROR_UNKNOWN_PRODUCT
|
||||||
|
; 3010 ERROR_SUCCESS_REBOOT_REQUIRED
|
||||||
|
LogError "Fatal: setup returned exit code " + $ExitCode$
|
||||||
|
IsFatalError
|
||||||
|
endif
|
Loading…
Reference in New Issue