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

Update package metadata #338

Merged
merged 5 commits into from Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Expand Up @@ -11,15 +11,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["pypy-2.7", "pypy-3.8", "2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
python-version: ["pypy-2.7", "pypy-3.8", "2.7", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
# Add new helper variables to existing jobs
- {python-version: "pypy-2.7", toxenv: "pypy"}
- {python-version: "pypy-3.8", toxenv: "pypy3"}
- {python-version: "2.7", toxenv: "py27"}
- {python-version: "3.5", toxenv: "py35"}
- {python-version: "3.6", toxenv: "py36"}
- {python-version: "3.7", toxenv: "py37"}
- {python-version: "3.8", toxenv: "py38"}
- {python-version: "3.9", toxenv: "py39"}
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

7 changes: 2 additions & 5 deletions Makefile
Expand Up @@ -18,7 +18,6 @@ pip=$(virtualenv)/bin/pip
syspython=python3.8
python=$(virtualenv)/bin/python
twine=$(virtualenv)/bin/twine
version=$(shell $(python) setup.py --version)

clean: ## Remove build artifacts, .pyc files, virtualenv
-rm -rf build dist MANIFEST colorama.egg-info $(virtualenv)
Expand Down Expand Up @@ -51,15 +50,13 @@ test: ## Run tests
# build packages

build: ## Build a release (sdist and wheel)
$(python) -m pip install --upgrade setuptools wheel
$(python) setup.py sdist bdist_wheel
$(python) -m build
.PHONY: build

test-release: build ## Test a built release
./test-release
.PHONY: test-release

release: ## Upload a built release
$(twine) upload dist/colorama-$(version)*
$(twine) upload dist/colorama-*
.PHONY: release

2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -30,7 +30,7 @@ If you find Colorama useful, please |donate| to the authors. Thank you!
Installation
------------

Tested on CPython 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 and 3.10 and Pypy 2.7 and 3.6.
Tested on CPython 2.7, 3.7, 3.8, 3.9 and 3.10 and Pypy 2.7 and 3.8.

No requirements other than the standard library.

Expand Down
5 changes: 2 additions & 3 deletions build.ps1
@@ -1,6 +1,5 @@
$ve="$HOME\.virtualenvs\colorama"
$bin="$ve\Scripts"

& $bin\python.exe -m pip install --upgrade setuptools wheel
& $bin\python.exe setup.py sdist bdist_wheel

& $bin\python.exe -m pip install --upgrade build
& $bin\python.exe -m build
64 changes: 64 additions & 0 deletions pyproject.toml
@@ -0,0 +1,64 @@
[build-system]
requires = [
"hatchling>=0.25.1",
]
build-backend = "hatchling.build"

[project]
name = "colorama"
description = "Cross-platform colored terminal text."
readme = "README.rst"
license = "BSD-3-Clause"
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*"
authors = [
{ name = "Jonathan Hartley", email = "tartley@tartley.com" },
]
keywords = [
"ansi",
"color",
"colour",
"crossplatform",
"terminal",
"text",
"windows",
"xplatform",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Terminals",
]
dynamic = [
"version",
]

[project.urls]
Homepage = "https://github.com/tartley/colorama"

[tool.hatch.version]
path = "colorama/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/colorama",
"/demos",
"/CHANGELOG.rst",
]

[tool.hatch.build.targets.wheel]
include = [
"/colorama/*",
]
wiggin15 marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 1 addition & 3 deletions release.ps1
@@ -1,7 +1,5 @@
$ve="$HOME\.virtualenvs\colorama"
$bin="$ve\Scripts"
$version="$(& $bin\python.exe setup.py --version)"

# Upload to PyPI.
& $bin\twine.exe upload dist\colorama-$version*.tar.gz dist\colorama-$version-*.whl

& $bin\twine.exe upload dist\colorama-*.tar.gz dist\colorama-*.whl
1 change: 1 addition & 0 deletions requirements-dev.txt
@@ -1,3 +1,4 @@
mock>=1.0.1;python_version<"3.3"
twine>=3.1.1
build
-e .
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

68 changes: 0 additions & 68 deletions setup.py

This file was deleted.

4 changes: 1 addition & 3 deletions test-release 100755 → 100644
Expand Up @@ -15,11 +15,10 @@ set -eu -o pipefail

syspython=python3
bin="$HOME/.virtualenvs/colorama/bin"
version=$($bin/python setup.py --version)
sandbox=test-release-playground

# Upload to the test PyPI.
$bin/twine upload --repository testpypi dist/colorama-$version* \
$bin/twine upload --repository testpypi dist/colorama-* \
|| echo " > Expect a 400 if package was already uploaded."

# cd elsewhere so we cannot import from local source.
Expand All @@ -45,4 +44,3 @@ mkdir -p $sandbox

# Tidy up
rm -rf $sandbox

4 changes: 1 addition & 3 deletions test-release.ps1
@@ -1,10 +1,9 @@
$syspython="python.exe"
$ve="$HOME\.virtualenvs\colorama"
$bin="$ve\Scripts"
$version="$(& $bin\python.exe setup.py --version)"

# Upload to the test PyPI.
& $bin\twine.exe upload --repository testpypi dist\colorama-$version-*
& $bin\twine.exe upload --repository testpypi dist\colorama-*
if(!$?) {
write-host " > Expect a 400 if package was already uploaded"
}
Expand All @@ -27,4 +26,3 @@ print(colorama.Fore.GREEN + ""OK Colorama "" + colorama.__version__ + "" from te
"@

cd ..

3 changes: 2 additions & 1 deletion tox.ini
@@ -1,5 +1,6 @@
[tox]
envlist = py27, py35, py36, py37, py38, py39, py310, pypy, pypy3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are removing py35 and py36 from the testing matrix we should reflect that in the README (we list tested versions under Installation)

isolated_build = true
envlist = py27, py37, py38, py39, py310, pypy, pypy3

[testenv]
deps = py27,pypy: mock
Expand Down