GithubHelp home page GithubHelp logo

msl-package-manager's People

Contributors

jborbely avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

msl-package-manager's Issues

add support for specifying a version number when installing/updating

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

Create a --prefix option to be able to install, update or list MSLNZ repositories that do not begin with msl-.

Error updating package if the installed name != repository name

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.

"pip install --upgrade msl-package-manager" fails on Windows

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:

  1. Use the --no-deps flag
  2. Remove pip from install_requires because this is a circular dependency (should setuptools and colorama also be upgraded?)
  3. Allow the msl-package-manager to upgrade itself
D:\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'

PyPI regex pattern is invalid for the /search endpoint

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.

invalid URL fragment with pip dependency resolver

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)

Updating non-MSL packages can install the wrong version

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.

add support for specifying an extras_require value when installing/updating

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

Wrong GitHub version installed

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

github rate-limit error message repeats

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.