Is it possible to refer to the git repository in pipenv as bundleler and npm?

Asked 2 years ago, Updated 2 years ago, 88 views

Pipenv is an application library management tool.Similar tools include nodejs' npm and ruby's bundle.

In npm or bundleer, there is a mechanism that directly specifies the git URL of the github to act as a library, even if it has not been released as a library.

Question

Can I specify dependencies in Pipenv for libraries that exist on the github master, for example, but have not yet been released to PyPI?

python pip pipenv

2022-09-30 20:11

1 Answers

Update content with Pipenv (move Pip backwards)

I think Pipenv is also possible as follows.

Python development summary using Pipenv
A little more advanced package management

To install a GitHub repository:

$pipenv install git+https://github.com/< User>/<Repository>.git@<Revision>#egg=<Package Name>

Installation from requirements.txt

If the package was managed by requirements.txt prior to the introduction of Pipenv, you can also install it by Pipenv.

$pipenv install-r./requirements.txt

Replace pipfile–requirements.txt


From Pipenv site Basic Use of Pipenv
General recommendations and version control

pipenv install is fully compatible with pip install grammar. You can find the complete documentation here.

Import from requirements.txt

If requirements.txt file is the only file you have when you run pipenv install, Pipenv automatically imports the contents of the file and creates a Pipfile.
You can also specify $pipenv install-r path/to/requirements.txt to import the requirements file.

Version Management System proviso

Pipenv can install packages from git and other version control systems that use URLs in the form of the following rules:

We strongly recommend that you use pipenv install-e to install version-managed dependencies in editable mode so that you can use the latest copy of the repository to resolve dependencies every time you run them.

How to use Pipenv
install

 pipenv install [OPTIONS] [PACKAGES] ...
    -e, --editable <editable >
      Editable python package URL or path, off to a VCS repo.
      URL or path of the editable python package.VCS repository in many cases.

However, it seems to be closed as follows, but there are many related issues, so it may still be buggy.
install private repos#313
Unable to install package from private repository#1393
Unable to install from private repo with git+ssh#2653
Wheel caching on private index vs Pipfile.lock hashes#2177
Installing private repo with git+git is not working at 2018.7.1 version #2704
pipenvignores explicitly specified index for package#2730
Pipenv install hangs, simple by adding private repository #2741
Installing from private git repository does not prompt for username and password. (v2018.11.26)#3333
How to use pipenv to install package from github

Pip related

I don't know if it will fit your questions and requests, but there is an article like the one below, and it seems that it is possible to install it from git or any kind of repository.
Install the github repository with pip

English StackOverflow article to pip documentation
pip install from git report branch/ pip install VCS Support
Install specific git commit with pip

There seems to be an article about specifying dependencies.
How do I pip a repository of githubs that rely on private packages?
pipignores dependency_links in setup.py
How to state in requirements.txt a direct github source

I don't understand the content because I'm just searching for it.For your reference.


2022-09-30 20:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.