New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardise on license_files, omit when possible? #73
Comments
I know there's a duple somewhere, but this setting is too new to do generically -- maybe in a few years |
I understand that the glob thing is too new to implement right now but regarding the other request : There's a replacement for the deprecated option, isn't using |
Yep, probably good to start getting projects moved over from the deprecated option to the supported one. |
2019 is significantly newer than any other date of support for declarative metadata: https://github.com/asottile/setup-py-upgrade#what-versions-of-setuptools--pip-does-the-output-work-with |
We could make it so setup-cfg-fmt could honor my
and thus emit Would this make sense? |
no thanks, I don't want to get into the business of reading toml and parsing requirements specifiers |
Do you have a rough idea of when it might be acceptable to do the jump? (When this was opened, 2018-03-21 was 36 months ago. Today, 2019-11-23 is 30 months ago, so perhaps in +6 months?) |
I tried to get some data on the setuptools version in each distro from repology. Notably, centos 7's version of setuptools is 39.2.0, its EOL is 2024-06-30 List of distros/repos whose latest version of setuptools is older than 42.0.0
Script I usedimport requests
from typing import cast
from typing import Union
from typing import TypedDict
import dataclasses
import packaging.version
import collections
VersionType = Union[packaging.version.Version, packaging.version.LegacyVersion]
class Package(TypedDict, total=False):
pep440version: VersionType
version: str
repo: str
subrepo: str
@dataclasses.dataclass
class Repo:
name: str
packages: list[Package] = dataclasses.field(default_factory=list)
def latest(self) -> VersionType:
return max(pkg["pep440version"] for pkg in self.packages)
def main() -> int:
resp = requests.get("https://repology.org/api/v1/project/python:setuptools")
pkgs = cast(list[Package], resp.json())
for pkg in pkgs:
pkg["pep440version"] = packaging.version.parse(pkg["version"])
repos_by_name = {}
for pkg in pkgs:
repo_name = pkg["repo"]
if repo_name not in repos_by_name:
repos_by_name[repo_name] = Repo(name=repo_name)
repos_by_name[repo_name].packages.append(pkg)
repos = sorted(repos_by_name.values(), key=lambda r: r.latest())
target = packaging.version.Version("42.0.0")
for repo in repos:
if repo.latest() >= target:
continue
print(f"{repo.latest()}: {repo.name}")
return 0
if __name__ == "__main__":
raise SystemExit(main()) |
Thanks, CentOS 7's version of virtualenv is 15.1.0, older than the existing requirement. List of distros/repos whose latest version of virtualenv is older than 15.21.5.1: slitaz_next |
About:
Newly released Setuptools 56.0.0 (changelog, docs, PR, issue) has deprecated
license_file
, andlicense_files
should be used instead.Further, if
license_files
is omitted, it defaults toLICEN[CS]E*
,COPYING*
,NOTICE*
,AUTHORS*
, matching the behaviour ofbdist_wheel
.To simplify a project's config, I removed
license_file = LICENCE
from a project'ssetup.cfg
, but then setup-cfg-fmt put it back :)Should setup-cfg-fmt standardise
license_file
->license_files
?And, if the value matches the glob pattern, should setup-cfg-fmt omit it completely?
Thanks!
The text was updated successfully, but these errors were encountered: