-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added `pyproject.toml`. Version is now populated automatically from git tags using `setuptools_scm`. Deleted `bumpversion.sh`. Fixed some missing metadata fields. Fixed the scripts to work with `pyproject.toml` and cleaned them up.
- Loading branch information
Showing
16 changed files
with
113 additions
and
124 deletions.
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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Autogenerated version file | ||
/adb_shell/version.py | ||
|
||
# Python files | ||
*.idea | ||
*.pyc | ||
|
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
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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
""" | ||
|
||
|
||
__version__ = '0.4.2' | ||
from .version import __version__ # noqa: F401 |
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,7 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.2.0", "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 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 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 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 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 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 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 |