Skip to content

Commit a611f05

Browse files
committed
update pyproject.toml
- Add classifiers (Python 3.X) - add project URLs - req. python >= 3.10 (not 3.12)
1 parent e4810fa commit a611f05

3 files changed

Lines changed: 48 additions & 33 deletions

File tree

open-codegen/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
Note: This is the Changelog file of `opengen` - the Python interface of OpEn
99

10+
## [0.10.1] - Unreleased
11+
12+
13+
### Changed
14+
15+
- Introduced `pyproject.toml` for packaging the Python library; constrained the versions of dependencies therein
16+
1017

1118
## [0.10.0] - 2026-03-19
1219

@@ -280,6 +287,7 @@ Note: This is the Changelog file of `opengen` - the Python interface of OpEn
280287
* Fixed `lbfgs` typo
281288

282289

290+
[0.10.1]: https://github.com/alphaville/optimization-engine/compare/opengen-0.10.0...opengen-0.10.1
283291
[0.10.0]: https://github.com/alphaville/optimization-engine/compare/opengen-0.9.6...opengen-0.10.0
284292
[0.9.6]: https://github.com/alphaville/optimization-engine/compare/opengen-0.9.5...opengen-0.9.6
285293
[0.9.5]: https://github.com/alphaville/optimization-engine/compare/opengen-0.9.4...opengen-0.9.5

open-codegen/publish-pypi.sh

100755100644
Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
11
#!/bin/sh
2-
# This is a script to faciliate the release of new versions
3-
# Make sure you have created a virtual environment, `venv`
4-
# and that you have installed twine
5-
2+
set -eu
3+
4+
# This script facilitates releasing a new version of opengen to PyPI.
5+
# It expects a local virtual environment at ./venv with publishing tools.
6+
67
echo "[OpEnGen] Checking out master"
78
git checkout master
89
git pull origin master
910

10-
echo "[OpEnGen] Clean build"
11-
rm -rf ./build ./dist opengen.egg-info
11+
echo "[OpEnGen] Cleaning previous build artifacts"
12+
rm -rf ./build ./dist ./opengen.egg-info
13+
14+
echo "[OpEnGen] Activating virtual environment"
15+
. venv/bin/activate
1216

13-
echo "[OpEnGen] Build (within a virtual environment)"
14-
source venv/bin/activate
15-
pip install .
17+
echo "[OpEnGen] Installing packaging tools"
18+
python -m pip install --upgrade pip build twine
1619

17-
echo "[OpEnGen] Build dist"
18-
python setup.py sdist bdist_wheel
20+
echo "[OpEnGen] Building source and wheel distributions"
21+
python -m build
1922

20-
echo "[OpEnGen] Check..."
21-
ok=`twine check dist/** | grep PASSED | wc -l`
22-
echo $ok
23-
if [ $ok -eq 2 ]; then
24-
echo "[OpEnGen] twine check: all passed"
25-
else
26-
echo "[OpEnGen] twine: some checks did not pass"
27-
exit 2
28-
fi
23+
echo "[OpEnGen] Checking distributions with twine"
24+
python -m twine check dist/*
2925

30-
echo "[OpEnGen] Uploading to pypi..."
31-
read -r -p "Are you sure? [y/N] " response
26+
echo "[OpEnGen] Uploading to PyPI..."
27+
printf "Are you sure? [y/N] "
28+
read -r response
3229
case "$response" in
33-
[yY][eE][sS]|[yY])
34-
echo "[OpEnGen] Thanks, uploading to PyPi now"
35-
twine upload dist/*
30+
[yY][eE][sS]|[yY])
31+
echo "[OpEnGen] Uploading to PyPI now"
32+
python -m twine upload dist/*
3633
;;
3734
*)
38-
echo "---"
35+
echo "[OpEnGen] Upload cancelled"
3936
;;
4037
esac
4138

4239
echo "[OpEnGen] Don't forget to create a tag; run:"
43-
a=`cat VERSION`
44-
echo "\$ git tag -a opengen-$a -m 'opengen-$a'"
45-
echo "\$ git push --tags"
40+
version=$(cat VERSION)
41+
echo "\$ git tag -a opengen-$version -m 'opengen-$version'"
42+
echo "\$ git push --tags"

open-codegen/pyproject.toml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ name = "opengen"
77
dynamic = ["version"]
88
description = "Optimization Engine Code Generator"
99
readme = { file = "README.md", content-type = "text/markdown" }
10-
requires-python = ">=3.12"
10+
requires-python = ">=3.10"
1111
authors = [
1212
{ name = "Pantelis Sopasakis", email = "[email protected]" },
1313
{ name = "Emil Fresk" },
1414
]
15-
license = { text = "MIT License" }
15+
license = "MIT OR Apache-2.0"
1616
keywords = [
1717
"optimization",
1818
"code-generation",
@@ -23,11 +23,12 @@ keywords = [
2323
]
2424
classifiers = [
2525
"Development Status :: 4 - Beta",
26-
"License :: OSI Approved :: MIT License",
27-
"License :: OSI Approved :: Apache Software License",
2826
"Programming Language :: Python",
2927
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
3030
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
3132
"Programming Language :: Rust",
3233
"Intended Audience :: Science/Research",
3334
"Topic :: Software Development :: Libraries",
@@ -46,6 +47,15 @@ dependencies = [
4647

4748
[project.urls]
4849
Homepage = "https://github.com/alphaville/optimization-engine"
50+
Documentation = "https://alphaville.github.io/optimization-engine/"
51+
Repository = "https://github.com/alphaville/optimization-engine"
52+
Changelog = "https://github.com/alphaville/optimization-engine/blob/master/open-codegen/CHANGELOG.md"
53+
54+
[project.optional-dependencies]
55+
dev = [
56+
"build>=1",
57+
"twine>=5",
58+
]
4959

5060
[tool.setuptools]
5161
include-package-data = true

0 commit comments

Comments
 (0)