Skip to content

Commit

Permalink
software: migrate from setup.py to pyproject.toml.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Feb 7, 2023
1 parent 86283d4 commit 386a7b8
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 63 deletions.
52 changes: 52 additions & 0 deletions software/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["setuptools~=67.0", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
dynamic = ["version"]

name = "glasgow"
description = "Software for the Glasgow Interface Explorer, a digital interface multitool"
authors = [
{name = "Catherine", email = "whitequark@whitequark.org"},
{name = "Glasgow Interface Explorer contributors"}
]
license = {text = "BSD-0-clause"}
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved",
"Topic :: Software Development :: Embedded Systems",
"Topic :: System :: Hardware",
]

dependencies = [
"amaranth @ git+https://github.com/amaranth-lang/amaranth.git",
"fx2>=0.11",
"libusb1>=1.8.1",
"aiohttp",
"pyvcd",
"bitarray",
"crcmod",
]

[project.optional-dependencies]
toolchain = [
"amaranth[builtin-yosys]",
"yowasp-yosys>=0.11",
"yowasp-nextpnr-ice40>=0.1",
]

[project.scripts]
glasgow = "glasgow.cli:main"

[project.urls]
# "Documentation" = "https://glasgow.readthedocs.io/"
"Source Code" = "https://github.com/GlasgowEmebedded/Glasgow"
"Bug Tracker" = "https://github.com/GlasgowEmebedded/Glasgow/issues"

[tool.setuptools.package-data]
"glasgow.device" = ["firmware.ihex"]

[tool.setuptools_scm]
root = ".."
local_scheme = "node-and-timestamp"
65 changes: 2 additions & 63 deletions software/setup.py
Original file line number Diff line number Diff line change
@@ -1,65 +1,4 @@
from setuptools import setup, find_packages
from setuptools import setup


def scm_version():
def local_scheme(version):
return version.format_choice("+{node}", "+{node}.dirty")
return {
"root": "..",
"relative_to": __file__,
"version_scheme": "guess-next-dev",
"local_scheme": local_scheme
}


setup(
name="glasgow",
use_scm_version=scm_version(),
author="whitequark",
author_email="whitequark@whitequark.org",
description="Software for Glasgow, a digital interface multitool",
#long_description="""TODO""",
license="0-clause BSD License",
python_requires="~=3.7",
setup_requires=[
"setuptools",
"setuptools_scm"
],
install_requires=[
"amaranth",
"fx2>=0.11",
"libusb1>=1.8.1",
"aiohttp",
"pyvcd",
"bitarray",
"crcmod",
],
extras_require={
"toolchain": [
"amaranth-yosys",
"yowasp-yosys>=0.11.*",
"yowasp-nextpnr-ice40>=0.1.*",
],
},
dependency_links=[
"git+https://github.com/amaranth-lang/amaranth.git#egg=amaranth",
],
packages=find_packages(),
package_data={"glasgow.device": ["firmware.ihex"]},
entry_points={
"console_scripts": [
"glasgow = glasgow.cli:main"
],
},
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved', # ' :: 0-clause BSD License', (not in PyPI)
'Topic :: Software Development :: Embedded Systems',
'Topic :: System :: Hardware',
],
project_urls={
#"Documentation": "https://glasgow.readthedocs.io/",
"Source Code": "https://github.com/GlasgowEmebedded/Glasgow",
"Bug Tracker": "https://github.com/GlasgowEmebedded/Glasgow/issues",
}
)
setup()

0 comments on commit 386a7b8

Please sign in to comment.