Skip to content

Commit

Permalink
build: migrate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Foley <[email protected]>
  • Loading branch information
krishnans2006 and pefoley2 committed May 1, 2024
1 parent f8d3893 commit 29e7158
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 37 deletions.
8 changes: 5 additions & 3 deletions Ion.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ Metadata-Version: 2.1
Name: Ion
Version: 1.0
Summary: The next-generation Intranet platform for TJHSST
Home-page: https://github.com/tjcsl/ion
Author: The TJHSST Computer Systems Lab
Author-email: [email protected]
Author-email: The TJHSST Computer Systems Lab <[email protected]>
License: GPLv2+
Project-URL: Repository, https://github.com/tjcsl/ion
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.8
Classifier: Framework :: Django :: 3.2
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: COPYING
Requires-Dist: argon2-cffi==21.3.0
Requires-Dist: autobahn==22.7.1
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
[project]
name = "Ion"
description = "The next-generation Intranet platform for TJHSST"
readme = "README.rst"
authors = [
{name = "The TJHSST Computer Systems Lab", email = "[email protected]"}
]
requires-python = ">=3.8"
version = "1.0"
dynamic = ["dependencies"]
license = { text = "GPLv2+" }
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.8",
"Framework :: Django :: 3.2",
]
[project.urls]
Repository = "https://github.com/tjcsl/ion"
[tool.setuptools]
packages = ["intranet"]
[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
[tool.black]
line-length = 150
exclude = '''
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ xhtml2pdf==0.2.11
asgiref>=3.3.4
pillow>=9.0.0
tinycss2
twisted>=21.7.0
twisted>=21.7.0
35 changes: 2 additions & 33 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup
from setuptools import setup

with open("README.rst", "r") as f:
long_description = f.read()


def get_requirements():
with open("requirements.txt") as req, open("docs/rtd-requirements.txt", "w") as rtd_file:
for dep in req:
print(dep.strip(), file=rtd_file)
yield dep.strip()


setup(
name="Ion",
description="The next-generation Intranet platform for TJHSST",
long_description=long_description,
author="The TJHSST Computer Systems Lab",
author_email="[email protected]",
url="https://github.com/tjcsl/ion",
version="1.0",
test_suite="intranet.test.test_suite.run_tests",
setup_requires=["pip>=6.0", "setuptools_git"], # session param
install_requires=[str(dep) for dep in get_requirements()],
packages=find_packages(),
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.8",
"Framework :: Django :: 3.2",
],
)
setup(test_suite="intranet.test.test_suite.run_tests")

0 comments on commit 29e7158

Please sign in to comment.