-
Notifications
You must be signed in to change notification settings - Fork 572
chore: Remove setup.py #1218
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
base: master
Are you sure you want to change the base?
chore: Remove setup.py #1218
Changes from all commits
705967f
84a871c
b8f443b
261dfc0
94b11a9
5456ae5
b6a2fad
1a42805
7a459ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,11 +12,6 @@ | |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from importlib import metadata | ||
| from importlib.metadata import version as _metadata_version | ||
|
|
||
|
|
||
| def _get_version(): | ||
| return metadata.version('Appium-Python-Client') | ||
|
|
||
|
|
||
| version = _get_version() | ||
| version = _metadata_version('Appium-Python-Client') | ||
|
Comment on lines
+15
to
+17
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -64,11 +64,6 @@ dev = [ | |||||||
| requires = ["hatchling"] | ||||||||
| build-backend = "hatchling.build" | ||||||||
|
|
||||||||
| [tool.hatch.version] | ||||||||
| source = "regex" | ||||||||
| path = "appium/version.py" | ||||||||
| pattern = "(?P<version>\\d+\\.\\d+\\.\\d+)" | ||||||||
|
|
||||||||
| [tool.hatch.build] | ||||||||
| exclude = [ | ||||||||
| "test/", | ||||||||
|
|
@@ -94,7 +89,7 @@ major_on_zero = true | |||||||
| allow_zero_version = false | ||||||||
| no_git_verify = false | ||||||||
| tag_format = "v{version}" | ||||||||
| version_toml = ["pyproject.toml:project.version"] | ||||||||
| version_toml = ["pyproject.toml:project.version", "appium/version.py:version"] | ||||||||
|
||||||||
| version_toml = ["pyproject.toml:project.version", "appium/version.py:version"] | |
| version_toml = ["pyproject.toml:project.version"] | |
| version_variables = ["appium/version.py:version"] |
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.
makes sense to me
This file was deleted.
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.
version = _metadata_version('Appium-Python-Client')will raiseimportlib.metadata.PackageNotFoundErrorwhen the distribution metadata is not available (e.g., running from a source checkout without an installed wheel/sdist), which makes importingappium.versionfail. Wrap the metadata lookup in a try/except and fall back to a safe value (the PR description mentions returning'unknown').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.
the PR description needs to be updated