pypa / pypa/setuptools

Support setuptools.sic in egg_info and bdist_wheel commands

Open
#2,181 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

In response to issue #308, PR #2026 added a sic class to allow versions to bypass normalization. Unfortunately this only fixed things for a few cases. Many other aspects of setuptools use safe_version in pkg_resources.

For example, consider a version of "1.2.3.beta". When running python setup.py egg_info, or python setup.py bdist_wheel (using the wheel extension), this will be truncated to 1.2.3b0.

As mentioned by some in issue #308 the full fix appears to be both what the sic function does as well as the monkeypatching of the pkg_resources.safe_version function. Someone even wrote a package to do this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the setuptools.sic behavior described in the issue, then trace the python setup.py egg_info and bdist_wheel entry points and the safe_version function in pkg_resources. Check how a version such as "1.2.3.beta" is transformed and verify that both commands preserve it without truncation or normalization.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.