Skip to content

Commit

Permalink
Moved the metadata into setup.cfg.
Browse files Browse the repository at this point in the history
Added `pyproject.toml`.
Version is now populated automatically from git tags using `setuptools_scm`.
Deleted `bumpversion.sh`.
Fixed some missing metadata fields.
  • Loading branch information
KOLANICH committed Jan 20, 2022
1 parent bf4d348 commit d794cae
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 64 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/python-package.yml
Expand Up @@ -25,10 +25,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build wheel setuptools setuptools_scm
if python --version 2>&1 | grep -q "Python 2"; then pip install mock rsa==4.0 libusb1==1.9.3; fi
python -m pip install flake8 pylint coveralls cryptography libusb1>=1.0.16 pycryptodome
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .
python -m build -nwsx .;
pip install ./dist/*.whl;
if python --version 2>&1 | grep -q "Python 3.7" || python --version 2>&1 | grep -q "Python 3.8" || python --version 2>&1 | grep -q "Python 3.9" || python --version 2>&1 | grep -q "Python 3.10"; then pip install aiofiles; fi
- name: Lint with pylint and flake8
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
# Autogenerated version file
/adb_shell/version.py

# Python files
*.idea
*.pyc
Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -12,7 +12,10 @@ addons:
- swig
- libusb-1.0-0-dev
install:
- pip install .
- pip install --upgrade pip
- pip install --upgrade build
- python -m build -nwx .
- pip install ./dist/*.whl
- pip install flake8 pylint coveralls cryptography libusb1>=1.0.16 pycryptodome
- python --version 2>&1 | grep -q "Python 2" && pip install mock || true
- if python --version 2>&1 | grep -q "Python 3.7" || python --version 2>&1 | grep -q "Python 3.8" || python --version 2>&1 | grep -q "Python 3.9"; then pip install aiofiles; fi
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -3,7 +3,7 @@ release:
rm -rf dist
rm -rf build
scripts/git_tag.sh
python setup.py sdist bdist_wheel
python -m build -nwsx
twine upload dist/*

.PHONY: docs
Expand Down
2 changes: 1 addition & 1 deletion adb_shell/__init__.py
Expand Up @@ -7,4 +7,4 @@
"""


__version__ = '0.4.2'
from .version import __version__ # noqa: F401
7 changes: 7 additions & 0 deletions pyproject.toml
@@ -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"
35 changes: 0 additions & 35 deletions scripts/bumpversion.sh

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/rename_package.sh
Expand Up @@ -32,8 +32,8 @@ sed -i "s|$PACKAGE|$1|g" $DIR/../Doxyfile
# Makefile
sed -i "s|$PACKAGE|$1|g" $DIR/../Makefile

# setup.py
sed -i "s|$PACKAGE|$1|g" $DIR/../setup.py
# setup.cfg
sed -i "s|$PACKAGE|$1|g" $DIR/../setup.cfg

# docs/Makefile
sed -i "s|$PACKAGE|$1|g" $DIR/../docs/Makefile
Expand Down
28 changes: 28 additions & 0 deletions setup.cfg
@@ -0,0 +1,28 @@
[metadata]
name = adb_shell
author = Jeff Irion
author_email = jefflirion@users.noreply.github.com
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_contet_type = text/x-rst
classifiers =
Operating System :: OS Independent
License :: OSI Approved :: Apache Software License
Programming Language :: Python :: 3
Programming Language :: Python :: 2

[options]
packages =
adb_shell
adb_shell.auth
adb_shell.transport
install_requires = cryptography; pyasn1; rsa
test_suite = tests
tests_require = pycryptodome; libusb1>=1.0.16

[options.extras_require]
usb = libusb1>=1.0.16
async = aiofiles>=0.4.0
24 changes: 0 additions & 24 deletions setup.py

This file was deleted.

0 comments on commit d794cae

Please sign in to comment.