manugarg / pacparser

A library to parse proxy auto-config (PAC) files
http://pacparser.manugarg.com
GNU Lesser General Public License v3.0
506 stars 116 forks source link

PIP install error #140

Closed actuarysailor closed 1 year ago

actuarysailor commented 1 year ago

image

image

Taknok commented 1 year ago

pip add new controls while installing a package. The check with the pypa version and metadata version is triggering here as the pypa declared version is 1.4.0 but the metadata version is 1.0.0.

The metadata version is 1.0.0 because the CI never set this env var PACPARSER_VERSION. Thus, the line https://github.com/manugarg/pacparser/blob/853e8f45607cb07b877ffd270c63dbcdd5201ad9/src/pymod/setup.py#L75 set the metadata version to 1.0.0.

The CI has to set this env to the release version.

manugarg commented 1 year ago

@Taknok If I understand it correctly, what you're suggesting is that since there is a mismatch in package version and binary version, pip is trying to rebuild the module. Is that correct?

manugarg commented 1 year ago

Actually I looked at the windows whl file here: https://pypi.org/project/pacparser/1.4.0/#modal-close (Just change extension to .zip to examine the file).

Metadata seems correct.

manugarg commented 1 year ago

@actuarysailor There are actually two possible reasons for pip to build it from sources:

If it's the latter, i.e. it's just the Python version mismatch, I've just submitted a change to build module for Python 3.11 as well: #141. Here are the binaries for that: Here: https://pypi.org/project/pacparser/1.4.0.dev3/#files

You can install it using:

pip install pacparser==1.4.0.dev3
manugarg commented 1 year ago

I could do both: reproduce the issue, and verify the fix.