mslnz / msl-package-manager Goto Github PK
View Code? Open in Web Editor NEWInstall, uninstall, update, list and create MSL packages
License: MIT License
Install, uninstall, update, list and create MSL packages
License: MIT License
Specifying a version number results in the following
> msl install loadlib==0.5.0
Getting the packages from ...
Loaded the cached information about the GitHub repositories
No MSL packages to install.
The current way of being able to do this is by specifying the tag
> msl install loadlib --tag v0.5.0
Add support for ==
, <=
and >=
version requirements.
Create a --prefix
option to be able to install, update or list MSLNZ repositories that do not begin with msl-
.
The RPi-SmartGadget
repository installs under the name smartgadget
. Cannot update it.
> msl list
Getting the packages from ...
MSL Package Version Description
------------------- ---------- --------------------------------------------------------
msl-network 0.4.1 Concurrent and asynchronous network I/O
msl-package-manager 2.3.0 Install, uninstall, update, list and create MSL packages
smartgadget 0.1.0.dev0 Communicate with a Sensirion SHTxx Smart Gadget
> msl update smartgadget -b master
Getting the packages from ...
Loaded the cached information about the GitHub repositories
Loaded the cached information about the PyPI packages
The following MSL packages will be UPDATED:
smartgadget: 0.1.0.dev0 --> [branch:master]
Proceed ([y]/n)?
Updating 'smartgadget' from GitHub/master
Collecting https://github.com/MSLNZ/smartgadget/archive/master.zip
ERROR: HTTP error 404 while getting https://github.com/MSLNZ/smartgadget/archive/master.zip
ERROR: Could not install requirement https://github.com/MSLNZ/smartgadget/archive/master.zip because of error 404 Client Error: Not Found for url: https://github.com/MSLNZ/smartgadget/archive/master
.zip
ERROR: Could not install requirement https://github.com/MSLNZ/smartgadget/archive/master.zip because of HTTP error 404 Client Error: Not Found for url: https://github.com/MSLNZ/smartgadget/archive/mas
ter.zip for URL https://github.com/MSLNZ/smartgadget/archive/master.zip
> msl update rpi-smartgadget -b master
Getting the packages from ...
Loaded the cached information about the GitHub repositories
Loaded the cached information about the PyPI packages
No MSL packages to update.
Upgrading on Windows fails if the version of pip is not the latest because pip tries to upgrade itself while it is being executed.
Options:
--no-deps
flagsetuptools
and colorama
also be upgraded?)msl-package-manager
to upgrade itselfD:\code>msl list
Inspecting packages in c:\users\jborbely\miniconda3\envs\bug
MSL Package Version Description
------------------- ------- --------------------------------------------------------
msl-package-manager 1.5.0 Install, uninstall, update, list and create MSL packages
D:\code>pip install --upgrade msl-package-manager
Collecting msl-package-manager
Using cached https://files.pythonhosted.org/packages/a6/e2/a369fb543e84198b5c27134d87bb5866f0efe857dcf7e832d1fe1fddd393/msl_package_manager-2.0.0-py2.py3-none-any.whl
Requirement already up-to-date: colorama in c:\users\jborbely\miniconda3\envs\bug\lib\site-packages (from msl-package-manager)
Collecting setuptools (from msl-package-manager)
Downloading https://files.pythonhosted.org/packages/ff/f4/385715ccc461885f3cedf57a41ae3c12b5fec3f35cce4c8706b1a112a133/setuptools-40.0.0-py2.py3-none-any.whl (567kB)
100% |################################| 573kB 3.4MB/s
Collecting pip (from msl-package-manager)
Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl
Installing collected packages: setuptools, pip, msl-package-manager
Found existing installation: setuptools 38.4.0
Uninstalling setuptools-38.4.0:
Successfully uninstalled setuptools-38.4.0
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Exception:
Traceback (most recent call last):
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\basecommand.py", line 215, in main
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\commands\install.py", line 342, in run
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\req\req_set.py", line 795, in install
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\req\req_install.py", line 767, in commit_uninstall
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\req\req_uninstall.py", line 142, in commit
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\shutil.py", line 266, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\Users\jborbely\Miniconda3\envs\bug\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
WindowsError: [Error 5] Access is denied: 'c:\\users\\jborbely\\appdata\\local\\temp\\pip-0jumuv-uninstall\\users\\jborbely\\miniconda3\\envs\\bug\\scripts\\pip.exe'
When getting the MSLNZ packages that are on PyPI the following log message is displayed
PyPI regex pattern is invalid for the /search endpoint
The JSON api of PyPI still works as a backup to get the package info, but this method requires that the names of all of the MSLNZ packages on PyPI to be hard-coded.
pip 20.3 introduced a new dependency resolver that is not compatible with some repositories, for example,
The following MSL packages will be INSTALLED:
pr-omega-logger 0.3.0 [GitHub]
Installing 'pr-omega-logger' from GitHub[main]
Collecting pr-omega-logger
Cloning https://github.com/MSLNZ/pr-omega-logger.git (to revision main) to c:\users\username\appdata\local\temp\pip-install-67vfasvn\pr-omega-logger_5b8
663c7e35a4c7a940984cf3d4841b8
Running command git clone -q https://github.com/MSLNZ/pr-omega-logger.git 'C:\Users\username\AppData\Local\Temp\pip-install-67vfasvn\pr-omega-logger_5b8
663c7e35a4c7a940984cf3d4841b8'
Resolved https://github.com/MSLNZ/pr-omega-logger.git to commit 0aeae1cf21406035c38c3b70cfb11abfa51896cb
WARNING: Generating metadata for package pr-omega-logger produced metadata for project name omega-logger. Fix your #egg=pr-omega-logger fragments.
WARNING: Discarding git+https://github.com/MSLNZ/pr-omega-logger.git@main#egg=pr-omega-logger. Requested omega-logger from git+https://github.com/MSLNZ/pr-
omega-logger.git@main#egg=pr-omega-logger has inconsistent name: filename has 'pr-omega-logger', but metadata has 'omega-logger'
ERROR: Could not find a version that satisfies the requirement pr-omega-logger (unavailable) (from versions: none)
ERROR: No matching distribution found for pr-omega-logger (unavailable)
msl-io
depends on xlrd<2.0
; however, executing
msl update --non-msl
could install the wrong version of xlrd
, for example,
The following non-MSL packages will be UPDATED:
xlrd 1.2.0 --> 2.0.1,<2.0 [PyPI]
msl-package-manager
will discover inconsistent dependencies when a package is updated (via pip's logging of error messages to the console) but this dependency resolver of pip was officially added in version 20.3. Therefore, as long as pip v20.3+ is installed the appropriate version of xlrd
would get installed, but the latest version would be initially installed. For older versions of pip that do not write error messages for inconsistent dependencies to the console, the wrong version of xlrd
would remain installed.
Executing msl list --json
raises TypeError: Object of type Requirement is not JSON serializable
The installed()
function returns a dict
and the 'requires'
key has values that are a list of Requirement
objects (from the pkg_resources
package).
Check if a newer version of the msl-package-manager is available from PyPI and, if so, display a message for how to update it.
Allow for specifying a value in extras_require
(which is defined in the setup.py
file) when installing a package.
> msl install loadlib[all]
Getting the packages from ...
Loaded the cached information about the GitHub repositories
No MSL packages to install.
Running this command should install msl-loadlib
, pythonnet
, py4j
and comtypes
When installing a package with only a GitHub release, the commit with the release tag is not installed but rather the main branch is installed
$ msl install equipment
...
The following MSL packages will be INSTALLED:
msl-equipment 0.1.0 [GitHub]
Proceed (Y/n)?
Installing 'msl-equipment' from GitHub[main]
...
So the main branch is installed, not version 0.1.0
When getting the information about the repositories from github and the rate limit is reached the log message can be displayed multiple times during a single call to the github() function. The log message should only be displayed once per function call.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.