Skip to content

Commit 374efbb

Browse files
committed
Update to pyproject.toml for package installation
1 parent 278f0db commit 374efbb

File tree

6 files changed

+71
-107
lines changed

6 files changed

+71
-107
lines changed

docs/conf.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
1919
#
2020
import os
21-
import sys
22-
sys.path.insert(0, '../pybobyqa/')
23-
from version import __version__
21+
import datetime
22+
import pybobyqa
2423

24+
current_year = datetime.date.today().year # used for copyright information
25+
pybobyqa_version = pybobyqa.__version__
2526

2627
# -- General configuration ------------------------------------------------
2728

@@ -48,17 +49,17 @@
4849

4950
# General information about the project.
5051
project = 'Py-BOBYQA'
51-
copyright = '2017, Lindon Roberts'
52+
copyright = '2017-%g, Lindon Roberts' % current_year
5253
author = 'Lindon Roberts'
5354

5455
# The version info for the project you're documenting, acts as replacement for
5556
# |version| and |release|, also used in various other places throughout the
5657
# built documents.
5758
#
5859
# The short X.Y version.
59-
version = __version__
60+
version = pybobyqa_version
6061
# The full version, including alpha/beta/rc tags.
61-
release = __version__
62+
release = pybobyqa_version
6263

6364
# The language for content autogenerated by Sphinx. Refer to documentation
6465
# for a list of supported languages.
@@ -94,7 +95,7 @@
9495

9596
# The name for this set of Sphinx documents. If None, it defaults to
9697
# "<project> v<release> documentation".
97-
html_title = 'Py-BOBYQA v%s documentation' % __version__
98+
html_title = 'Py-BOBYQA v%s documentation' % pybobyqa_version
9899

99100
# Theme options are theme-specific and customize the look and feel of a theme
100101
# further. For a list of options available for each theme, see the

pybobyqa/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@
3939
# Ensure compatibility with Python 2
4040
from __future__ import absolute_import, division, print_function, unicode_literals
4141

42-
from .version import __version__
43-
__all__ = ['__version__']
42+
__version__ = '1.4'
4443

4544
# Main solver & exit flags
4645
from .solver import *
47-
__all__ += ['solve']
46+
__all__ = ['solve']
4847

pybobyqa/version.py

-25
This file was deleted.

pyproject.toml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[build-system]
2+
requires = ["setuptools >= 61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "Py-BOBYQA"
7+
dynamic = ["version"]
8+
dependencies = [
9+
"setuptools",
10+
"numpy",
11+
"scipy",
12+
"pandas"
13+
]
14+
requires-python = ">=3.8"
15+
authors = [
16+
{name = "Lindon Roberts", email = "[email protected]"}
17+
]
18+
maintainers = [
19+
{name = "Lindon Roberts", email = "[email protected]"}
20+
]
21+
description = "A flexible derivative-free solver for (bound constrained) general objective minimization"
22+
readme = "README.rst"
23+
license = {text = "GPL-3.0-or-later"}
24+
keywords = ["mathematics", "optimization", "derivative free optimization"]
25+
classifiers = [
26+
"Development Status :: 5 - Production/Stable",
27+
"Environment :: Console",
28+
"Framework :: IPython",
29+
"Framework :: Jupyter",
30+
"Intended Audience :: Science/Research",
31+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
32+
"Operating System :: MacOS",
33+
"Operating System :: Microsoft :: Windows",
34+
"Operating System :: Unix",
35+
"Programming Language :: Python",
36+
"Programming Language :: Python :: 3",
37+
"Programming Language :: Python :: 3.8",
38+
"Programming Language :: Python :: 3.9",
39+
"Programming Language :: Python :: 3.10",
40+
"Programming Language :: Python :: 3.11",
41+
"Programming Language :: Python :: 3.12",
42+
"Topic :: Scientific/Engineering",
43+
"Topic :: Scientific/Engineering :: Mathematics"
44+
]
45+
46+
[project.optional-dependencies]
47+
dev = ["pytest", "Sphinx", "sphinx-rtd-theme"]
48+
trustregion = ["trustregion>=1.1"]
49+
50+
[project.urls]
51+
Homepage = "https://github.com/numericalalgorithmsgroup/pybobyqa"
52+
Download = "https://github.com/numericalalgorithmsgroup/pybobyqa/releases/"
53+
"Bug Tracker" = "https://github.com/numericalalgorithmsgroup/pybobyqa/issues/"
54+
Documentation = "https://numericalalgorithmsgroup.github.io/pybobyqa/"
55+
"Source Code" = "https://github.com/numericalalgorithmsgroup/pybobyqa"
56+
57+
[tool.setuptools]
58+
packages = ["pybobyqa"]
59+
60+
[tool.setuptools.dynamic]
61+
version = {attr = "pybobyqa.__version__"}

requirements.txt

-2
This file was deleted.

setup.py

-70
This file was deleted.

0 commit comments

Comments
 (0)