Skip to content

Commit 3994e16

Browse files
committed
upgrade build system to pdm
1 parent 3da5a6e commit 3994e16

File tree

6 files changed

+89
-108
lines changed

6 files changed

+89
-108
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
**0.15.5** (16 April 2025) - hotfix:
4+
5+
**Changed**:
6+
7+
- Internal: Upgrade build system to `pdm`. This is important for the road ahead, since the old `setuptools` build system has been deprecated.
8+
- Bump `mcpyrate` to the hotfix version 3.6.4.
9+
- The only difference is (beside `mcpyrate` too internally upgrading its build system to `pdm`) that the text colorizer now works correctly also for `input` with `readline`.
10+
11+
12+
---
13+
314
**0.15.4** (27 September 2024) - hotfix:
415

516
**Fixed**

makedist.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
python3 setup.py sdist bdist_wheel
2+
pdm build

pyproject.toml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[project]
2+
name = "unpythonic"
3+
description = "Supercharge your Python with parts of Lisp and Haskell."
4+
authors = [
5+
{ name = "Juha Jeronen", email = "[email protected]" },
6+
]
7+
requires-python = ">=3.8,<3.13"
8+
9+
# the `read` function and long_description_content_type from setup.py are no longer needed,
10+
# modern build tools like pdm/hatch already know how to handle markdown if you point them at a .md file
11+
# they will set the long_description and long_description_content_type for you
12+
readme = "README.md"
13+
14+
license = { text = "BSD" }
15+
16+
# This tells whichever build backend you use (pdm in our case) to run its own mechanism to find the version
17+
# of the project and plug it into the metadata
18+
# details for how we instruct pdm to find the version are in the `[tool.pdm.version]` section below
19+
dynamic = ["version"]
20+
21+
dependencies = [
22+
"mcpyrate>=3.6.4",
23+
"sympy>=1.13"
24+
]
25+
keywords=["functional-programming", "language-extension", "syntactic-macros",
26+
"tail-call-optimization", "tco", "continuations", "currying", "lazy-evaluation",
27+
"dynamic-variable", "macros", "lisp", "scheme", "racket", "haskell"]
28+
classifiers = [
29+
"Development Status :: 4 - Beta",
30+
"Environment :: Console",
31+
"Intended Audience :: Developers",
32+
"License :: OSI Approved :: BSD License",
33+
"Operating System :: POSIX :: Linux",
34+
"Programming Language :: Python",
35+
"Programming Language :: Python :: 3",
36+
"Programming Language :: Python :: 3.8",
37+
"Programming Language :: Python :: 3.9",
38+
"Programming Language :: Python :: 3.10",
39+
"Programming Language :: Python :: 3.11",
40+
"Programming Language :: Python :: 3.12",
41+
"Programming Language :: Python :: Implementation :: CPython",
42+
"Programming Language :: Python :: Implementation :: PyPy",
43+
"Topic :: Software Development :: Libraries",
44+
"Topic :: Software Development :: Libraries :: Python Modules"
45+
]
46+
47+
[project.urls]
48+
Repository = "https://github.com/Technologicat/unpythonic"
49+
50+
[build-system]
51+
requires = ["pdm-backend"]
52+
build-backend = "pdm.backend"
53+
54+
[tool.pdm.version]
55+
# the `file` source tells pdm to look for a line in a file that matches the regex `__version__ = ".*"`
56+
# The regex parse is fairly robust, it can handle arbitray whitespace and comments
57+
source = "file"
58+
path = "unpythonic/__init__.py"
59+
60+
[tool.pdm.build]
61+
# we don't need to explicitly inclue `mcpyrate.repl`. Unlink with setuptools, pdm automatically includes
62+
# all packages and modules in the source tree pointed to by `includes`, minus any paths matching `excludes`
63+
includes = ["unpythonic"]
64+
excludes = ["**/tests", "**/__pycache__"]
65+
66+
# note the exclusion of an equivalent to zip_safe. I used to think that zip_safe was a core python metadata flag
67+
# telling pip and other python tools not to include the package in any kind of zip-import or zipapp file.
68+
# I was wrong. zip_safe is a setuptools-specific flag that tells setuptools to not include the package in a bdist_egg
69+
# Since bdist_eggs are no longer really used by anything and have been completely supplanted by wheels, zip_safe has no meaningful effect.
70+
# The effect i think you hoped to achieve with zip_safe is achieved by excluding `__pycache__` folders from
71+
# the built wheels, using the `excludes` field in the `[tool.pdm.build]` section above.
72+
73+
# most python tools at this point, including mypy, have support for sourcing configuration from pyproject.toml
74+
# making the setup.cfg file unnecessary
75+
[tool.mypy]
76+
show_error_codes = true

requirements.txt

-2
This file was deleted.

setup.py

-104
This file was deleted.

unpythonic/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
for a trip down the rabbit hole.
88
"""
99

10-
__version__ = '0.15.4'
10+
__version__ = '0.15.5'
1111

1212
from .amb import * # noqa: F401, F403
1313
from .arity import * # noqa: F401, F403

0 commit comments

Comments
 (0)