-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
python-packaging 24.0 #23091
Closed
Closed
python-packaging 24.0 #23091
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sources: | ||
"24.0": | ||
url: "https://github.com/pypa/packaging/archive/refs/tags/24.0.tar.gz" | ||
sha256: "1bf35cf2c2be982f2ae6c905760ae19cb744fadbf56269f2e54f7bdcef64d291" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,45 @@ | ||||||
from conan import ConanFile | ||||||
from conan.tools.files import copy, get | ||||||
from conan.tools.layout import basic_layout | ||||||
import os | ||||||
|
||||||
|
||||||
required_conan_version = ">=1.47.0" | ||||||
|
||||||
|
||||||
class PackageConan(ConanFile): | ||||||
name = "python_packaging" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
description = "Core utilities for Python packages" | ||||||
license = ("BSD-2-Clause", "Apache-2.0") | ||||||
url = "https://github.com/conan-io/conan-center-index" | ||||||
homepage = "https://github.com/pypa/packaging/" | ||||||
topics = ("python") | ||||||
package_type = "build-scripts" | ||||||
settings = "os", "arch", "compiler", "build_type" | ||||||
no_copy_source = True | ||||||
|
||||||
def layout(self): | ||||||
basic_layout(self, src_folder="src") | ||||||
|
||||||
def package_id(self): | ||||||
self.info.clear() | ||||||
|
||||||
def source(self): | ||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True) | ||||||
|
||||||
def build(self): | ||||||
pass | ||||||
|
||||||
def package(self): | ||||||
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) | ||||||
copy(self, "*", os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "lib", "python3", "dist-packages")) | ||||||
|
||||||
def package_info(self): | ||||||
self.cpp_info.frameworkdirs = [] | ||||||
self.cpp_info.libdirs = [] | ||||||
self.cpp_info.resdirs = [] | ||||||
self.cpp_info.includedirs = [] | ||||||
|
||||||
opengv_dist_packages = os.path.join(self.package_folder, "lib", "python3", "dist-packages") | ||||||
self.runenv_info.prepend_path("PYTHONPATH", opengv_dist_packages) | ||||||
self.env_info.PYTHONPATH.append(opengv_dist_packages) # remove in conan v2? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from conan import ConanFile | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "VirtualBuildEnv" | ||
test_type = "explicit" | ||
|
||
def build_requirements(self): | ||
self.tool_requires(self.tested_reference_str) | ||
|
||
def test(self): | ||
self.run("python -c \"import packaging.version\"") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
versions: | ||
"24.0": | ||
folder: all |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have consistence naming. #23098 used a hypen instead of underscore.
Personally, I would prefer a hypen. It is also closer to how we handle double package names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used a hyphen to stay as close as possible to how Linux distributions manage Python packages, fyi.