question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

install local wheel file will generate two records in lock file

See original GitHub issue

I wanna to install pyscard from wheel on my local disk.

so i write an item into my Pipfile. cp36-win32-p_y_scard = {path = "wheelhouse/pyscard-1.9.7-cp36-cp36m-win_amd64.whl",sys_platform = "== 'win32'"}

then i type “pipenv install” installing pyscard package.

this package install success. but it seems two records is generated in lock file. the first is: "cp36-win32-p-y-scard": { "path": "wheelhouse/pyscard-1.9.7-cp36-cp36m-win_amd64.whl", "sys_platform": "== 'win32'" }, the second is: "pyscard": { "hashes": [ "sha256:412c74c83e7401566e9d3d7b8b5ca965e74582a1f33179b3c1fabf1da73ebf80", "sha256:c804cd6891172e172ac404cd40bc9187c1f610a8011ddd9ec3a3a00f6c9ad6ea" ], "markers": "sys_platform == 'win32'", "version": "==1.9.7" }, From the two hash values listed in “pyscard”. I can find the SHA256 hash of file from pypi is “412c74c8…”, the SHA256 hash of file from my local disk is " c804cd68…".

So should i get the first record in my Pipfile.lock? or is this a bug?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
frostmingcommented, Aug 5, 2019

@hartror

{
    "cp36-win32-p-y-scard": {
    "hashes": [
        "sha256:c804cd6891172e172ac404cd40bc9187c1f610a8011ddd9ec3a3a00f6c9ad6ea"
    ],
    "path": "path_to_wheel.whl",
    "markers": "sys_platform == 'win32'"
}

If Pipfile also contains the canonical pyscard package, then the pyscard should also be in Pipfile.lock, with PyPI hashes only.

0reactions
hartrorcommented, Aug 5, 2019

So the OP’s lockfile should be this?

"cp36-win32-p-y-scard": { "hashes": [ "sha256:c804cd6891172e172ac404cd40bc9187c1f610a8011ddd9ec3a3a00f6c9ad6ea" ], "markers": "sys_platform == 'win32'" },

Read more comments on GitHub >

github_iconTop Results From Across the Web

PipEnv: How to handle locally installed .whl packages
In a previous project I just pipenv installed the .whl files from some local folder into my environment, but this seems to cause...
Read more >
Pick a Python Lockfile and Improve Security
Phylum can read lockfiles from many different sources to make sure ... are simple text files containing a list of items to be...
Read more >
How can I install a local version of my package with poetry ...
I think what may help you is the poetry build command. This will create a wheel and a tar file and place it...
Read more >
How to install, download and build Python wheels
This will create both a source distribution (sdist) and a wheel file (bdist_wheel) , along with all of its dependencies. You can now...
Read more >
PEP 665, take 2 -- A file format to list Python dependencies ...
A lock file records the packages that are to be installed for an ... wheels to unambiguously define what files will be placed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found