Skip to content
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

Switch to pyproject.toml #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__/
*.py[cod]
*$py.class
*.egg-info

# C extensions
*.so
Expand All @@ -16,3 +17,6 @@ htmlcov/
nosetests.xml
coverage.xml
*,cover

# venv
.venv
Empty file added cc2538_bsl/__init__.py
Empty file.
5 changes: 4 additions & 1 deletion cc2538-bsl.py → cc2538_bsl/cc2538_bsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ def cli_setup():

return parser.parse_args()

if __name__ == "__main__":
def main_cli():
args = cli_setup()

force_speed = False
Expand Down Expand Up @@ -1263,3 +1263,6 @@ def cli_setup():
if QUIET >= 10:
traceback.print_exc()
exit('ERROR: %s' % str(err))

if __name__ == "__main__":
main_cli()
41 changes: 39 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
[build-system]
requires = [
"setuptools>=60",
"setuptools-scm>=8.0"]
"setuptools-scm>=8.0"
]
build-backend = "setuptools.build_meta"

[project]
name = "cc2538-bsl"
dynamic = ["version", "description", "readme", "requires-python", "license", "authors", "keywords", "classifiers", "dependencies", "optional-dependencies"]
description="Script to communicate with Texas Instruments CC13xx/CC2538/CC26xx Serial Boot Loader ."
keywords=[ "cc2538", "cc1310", "cc13xx", "bootloader", "cc26xx", "cc2650", "cc2640" ]
authors = [ { name = "Jelmer Tiete", email = "[email protected]" } ]
readme = "README.md"
license = { file = "LICENSE.md" }
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.4"
dynamic = ["version"]
dependencies = [ "pyserial" ]

[project.urls]
Home = "https://github.com/JelmerT/cc2538-bsl"
Repository = "https://github.com/JelmerT/cc2538-bsl"
Issues = "https://github.com/JelmerT/cc2538-bsl/issues"

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "node-and-date"

[project.optional-dependencies]
cc2538-bsl = [ "intelhex" ]
intelhex = [ "python-magic" ]

[project.scripts]
cc2538-bsl = "cc2538_bsl.cc2538_bsl:main_cli"
# cc2538-bsl = "cc2538-bsl.py"

[tool.setuptools]
platforms = ["posix"]
36 changes: 0 additions & 36 deletions setup.py

This file was deleted.