-
Notifications
You must be signed in to change notification settings - Fork 67
Moved the metadata into setup.cfg
#197
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
Open
KOLANICH
wants to merge
1
commit into
JeffLIrion:master
Choose a base branch
from
KOLANICH-libs:setup.cfg
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
""" | ||
|
||
|
||
__version__ = '0.4.2' | ||
from .version import __version__ # noqa: F401 |
This file contains hidden or 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,7 @@ | ||
[build-system] | ||
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "adb_shell/version.py" | ||
write_to_template = "'''Generated by setuptools_scm'''\n__version__ = '{version}'\n" |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
import typing | ||
from pathlib import Path | ||
|
||
import tomli | ||
|
||
__license__ = "Unlicense" | ||
__copyright__ = """ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <https://unlicense.org/> | ||
""" | ||
|
||
|
||
def getPackageName(rootDir: Path) -> str: | ||
from setuptools.config import read_configuration | ||
|
||
setupCfg = read_configuration(Path(rootDir / "setup.cfg")) | ||
try: | ||
return setupCfg["metadata"]["name"] | ||
except KeyError: | ||
return None | ||
|
||
|
||
def main(): | ||
if len(sys.argv) > 1: | ||
p = sys.argv[1] | ||
else: | ||
p = "." | ||
pn = getPackageName(Path(p)) | ||
if pn: | ||
print(pn, file=sys.stdout) | ||
else: | ||
print("Package name could not be determined", file=sys.stderr) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,15 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
|
||
__license__ = "Unlicense" | ||
|
||
if __name__ == "__main__": | ||
import setuptools_scm | ||
|
||
v = setuptools_scm.get_version(local_scheme="no-local-version").rsplit(".", 1) | ||
if not v: | ||
print("Version could not be determined", file=sys.stderr) | ||
sys.exit(1) | ||
if v[-1].startswith("dev"): | ||
v = v[:-1] | ||
print(".".join(v)) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,29 @@ | ||
[metadata] | ||
name = adb_shell | ||
author = Jeff Irion | ||
author_email = [email protected] | ||
description = A Python implementation of ADB with shell and FileSync functionality. | ||
license = Apache-2.0 | ||
keywords = adb, android | ||
url = https://github.com/JeffLIrion/adb_shell | ||
long_description = file: README.rst | ||
long_description_content_type = text/x-rst | ||
classifiers = | ||
Operating System :: OS Independent | ||
License :: OSI Approved :: Apache Software License | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 2 | ||
|
||
[options] | ||
install_requires = cryptography; pyasn1; rsa | ||
packages = adb_shell, adb_shell.auth, adb_shell.transport | ||
|
||
[options.extras_require] | ||
usb = libusb1>=1.0.16 | ||
async = aiofiles>=0.4.0 | ||
testing = pycryptodome; libusb1>=1.0.16 | ||
|
||
[tool.setuptools] | ||
|
||
[distutils.bdist_wheel] | ||
universal = 1 |
This file was deleted.
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.
Uh oh!
There was an error while loading. Please reload this page.