Skip to content

Commit

Permalink
Migrate setup.py → pyproject.toml
Browse files Browse the repository at this point in the history
See PEP 621 and PEP 518.

Keep setup.py for legacy installs.
The proper way to install is now: pip install
  • Loading branch information
DimitriPapadopoulos committed Dec 9, 2023
1 parent f3f0fec commit fba5f5e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
30 changes: 27 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
[build-system]
requires = [
"setuptools",
]
requires = ["setuptools>=64.0.0", "setuptools-scm"]
build-backend = "setuptools.build_meta"


[project]
name = "py-cpuinfo"
version = "9.0.0"
description = "Get CPU info with pure Python"
license = {text = "MIT"}
authors = [
{name = "Matthew Brennan Jones", email = "[email protected]"}
]
readme = "README.rst"
requires-python = ">=3"
classifiers=[
"Development Status :: 5 - Production/Stable",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3"
]
packages=["cpuinfo"]

[project.urls]
homepage = "https://github.com/workhorsy/py-cpuinfo"
repository = "https://github.com/workhorsy/py-cpuinfo.git"

[project.scripts]
cpuinfo = "cpuinfo:main"
29 changes: 3 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
#!/usr/bin/env python
# Copyright (c) 2014-2022 Matthew Brennan Jones <[email protected]>
# Py-cpuinfo gets CPU info with pure Python
# It uses the MIT License
# It is hosted at: https://github.com/workhorsy/py-cpuinfo

import os
from setuptools import setup

with open(os.path.join(os.getcwd(), 'README.rst')) as f:
readme_content = f.read()

setup(
name = "py-cpuinfo",
version = "9.0.0",
author = "Matthew Brennan Jones",
author_email = "[email protected]",
description = "Get CPU info with pure Python",
long_description=readme_content,
python_requires='>=3',
license = "MIT",
url = "https://github.com/workhorsy/py-cpuinfo",
packages=['cpuinfo'],
test_suite="test_suite",
entry_points = {
'console_scripts': ['cpuinfo = cpuinfo:main'],
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3"
],
)
if __name__ == "__main__":
setup()

0 comments on commit fba5f5e

Please sign in to comment.