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

Migrate setup.py → pyproject.toml #190

Open
wants to merge 2 commits 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
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
python -m pip install --upgrade pip
- name: Run tests
run: |
python setup.py test
python test_suite.py
34 changes: 31 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
[build-system]
requires = [
"setuptools",
]
requires = ["setuptools>=61.0"]
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 = "matthew.brennan.jones@gmail.com"}
]
readme = "README.md"
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"
Issues = "https://github.com/workhorsy/py-cpuinfo/issues"
Changelog = "https://github.com/workhorsy/py-cpuinfo/blob/master/ChangeLog"

[project.scripts]
cpuinfo = "cpuinfo:main"

[tool.distutils.bdist_wheel]
universal = false
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

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 <matthew.brennan.jones@gmail.com>
# 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 = "matthew.brennan.jones@gmail.com",
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()