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

Pyproject.toml #222

Merged
merged 42 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
aab7bab
change to pyproject.toml and setup.cfg
Christian-B Mar 17, 2023
319e512
can only use * once
Christian-B Mar 17, 2023
51b85f1
uses run install
Christian-B Mar 17, 2023
0c532ac
default build system
Christian-B Mar 17, 2023
973188d
local project path
Christian-B Mar 17, 2023
24ed292
/home/runner/work/SpiNNUtils
Christian-B Mar 17, 2023
7fbc30f
need double SpiNNUtils
Christian-B Mar 17, 2023
1c2a391
version fix
Christian-B Mar 17, 2023
db674fd
comment out version for now
Christian-B Mar 17, 2023
f1a274f
__version__
Christian-B Mar 17, 2023
d8eaa6c
change to pyproject.toml and setup.cfg
Christian-B Mar 17, 2023
b6d2c61
spinn_utilities.__version__
Christian-B Mar 17, 2023
c42a5f3
new line
Christian-B Mar 17, 2023
23cf296
cap numpy as 3.8
Christian-B Mar 20, 2023
d1b2968
Merge remote-tracking branch 'origin/pyproject.toml' into pyproject.toml
Christian-B Mar 20, 2023
984334e
install_requires in correct place
Christian-B Mar 20, 2023
96a7f55
test jsonschema
Christian-B Mar 20, 2023
24920bd
no longer need requirements files
Christian-B Mar 20, 2023
1e3c599
higher flake8
Christian-B Mar 20, 2023
28fd158
free flake8
Christian-B Mar 20, 2023
768d3f2
remove __legacy__
Christian-B Mar 20, 2023
f513ab7
minimum flake8
Christian-B Mar 20, 2023
d489f9c
intentional flake8 errors
Christian-B Mar 20, 2023
4146dbc
Revert "intentional flake8 errors"
Christian-B Mar 20, 2023
82b986b
get version from _version.py
Christian-B Mar 21, 2023
4ba28c0
get version from _version.py
Christian-B Mar 21, 2023
cab5680
removed incorrect [
Christian-B Mar 21, 2023
bcd0976
More metadata corrections
dkfellows Mar 21, 2023
f2019da
minor setup.cfg changes
Christian-B Mar 28, 2023
62b6393
dummy setup.py
Christian-B Mar 28, 2023
3ad9292
comment out long description and fix manifest
Christian-B Mar 29, 2023
b22f1c3
options.packages.find
Christian-B Mar 29, 2023
8c3d25c
fix MANIFEST.in
Christian-B Mar 29, 2023
34d6ff9
merged in master
Christian-B Mar 30, 2023
5e8c821
leave the install of coverage,flake8, pylint and spinx to the scripts
Christian-B Mar 30, 2023
2fd83f9
more files in MANIFEST.in
Christian-B Mar 30, 2023
a154ea1
remove previous build data
Christian-B Mar 31, 2023
2e83fe2
include is not recursive
Christian-B Mar 31, 2023
fbe306d
comment setup.py
Christian-B Apr 3, 2023
655f156
include cfg file
Christian-B Apr 3, 2023
362a0ca
add db.sql to install
Christian-B Apr 3, 2023
f5e2dad
merged in master
Christian-B Apr 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
path: support
- name: Install pip, etc.
uses: ./support/actions/python-tools
- name: Setup
uses: ./support/actions/run-setup

- name: Run Install
uses: ./support/actions/run-install
- name: Test with pytest
uses: ./support/actions/pytest
with:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include CITATION.cff LICENSE.md requirements.txt pypi_to_import
include LICENSE LICENSE_POLICY.md README.md CITATION.cff
10 changes: 4 additions & 6 deletions requirements.txt → pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 The University of Manchester
# Copyright (c) 2023 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

appdirs
numpy > 1.13, < 1.21; python_version == '3.7'
numpy < 1.24; python_version >= '3.8'
pyyaml
requests >= 2.4.1
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
23 changes: 0 additions & 23 deletions requirements-test.txt

This file was deleted.

72 changes: 72 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright (c) 2023 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[metadata]
name = SpiNNUtilities
version = attr: spinn_utilities._version.__version__
description = Utility classes and functions for SpiNNaker projects
#long_description = file: README.md
#long_description_content_type = text/markdown
url = https://github.com/SpiNNakerManchester/SpiNNUtils
license = Apache-2.0
classifiers=
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: Apache License 2.0
Natural Language :: English
Operating System :: POSIX :: Linux
Operating System :: Microsoft :: Windows
Operating System :: MacOS
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 :: 3.11
maintainer = SpiNNakerTeam
maintainer_email = [email protected]
keywords =
spinnaker
utilities

[options]
python_requires = >=3.7, <4
packages = find_namespace:
zip_safe = True
include_package_data = True
install_requires =
appdirs
numpy < 1.24
pyyaml
requests

[options.packages.find]
include =
spinn_utilities
spinn_utilities.*

[options.package_data]
* =
spinn_utilities.cfg
progress_bar.txt
db.sql

[options.extras_require]
test =
# pytest will be brought in by pytest-cov
pytest-cov
testfixtures
httpretty != 1.0.0

89 changes: 19 additions & 70 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 The University of Manchester
# Copyright (c) 2023 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,73 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import distutils.dir_util
from setuptools import setup
import os
from collections import defaultdict
try:
from setuptools import setup
except ImportError:
from distutils.core import setup

__version__ = None
exec(open("spinn_utilities/_version.py").read())
assert __version__

# Build a list of all project modules, as well as supplementary files
main_package = "spinn_utilities"
extensions = {".aplx", ".boot", ".cfg", ".json", ".sql", ".template", ".txt",
".xml", ".xsd"}
main_package_dir = os.path.join(os.path.dirname(__file__), main_package)
start = len(main_package_dir)
packages = []
package_data = defaultdict(list)
for dirname, dirnames, filenames in os.walk(main_package_dir):
if '__init__.py' in filenames:
package = "{}{}".format(
main_package, dirname[start:].replace(os.sep, '.'))
packages.append(package)
for filename in filenames:
_, ext = os.path.splitext(filename)
if ext in extensions:
package = "{}{}".format(
main_package, dirname[start:].replace(os.sep, '.'))
package_data[package].append(filename)

setup(
name="SpiNNUtilities",
version=__version__,
description="Utility classes and functions for SpiNNaker projects",
url="https://github.com/SpiNNakerManchester/SpiNNUtils",
license="Apache License 2.0",
classifiers=[
"Development Status :: 5 - Production/Stable",

"Intended Audience :: Developers",
"Intended Audience :: Science/Research",

"License :: OSI Approved :: Apache License 2.0",

"Natural Language :: English",

"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",

"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 :: 3.11",
],
packages=packages,
package_data=package_data,
install_requires=[
"appdirs",
"numpy > 1.13, < 1.21; python_version == '3.7'",
"numpy < 1.24; python_version >= '3.8'",
"pyyaml",
"requests >= 2.4.1",
],
maintainer="SpiNNakerTeam",
maintainer_email="[email protected]"
)
import sys


if __name__ == '__main__':
# Repeated installs assume files have not changed
# https://github.com/pypa/setuptools/issues/3236
if len(sys.argv) > 0 and sys.argv[1] == 'egg_info':
# on the first call to setpy.py remove files left by previous install
this_dir = os.path.dirname(os.path.abspath(__file__))
build_dir = os.path.join(this_dir, "build")
if os.path.isdir(build_dir):
distutils.dir_util.remove_tree(build_dir)
egg_dir = os.path.join(this_dir, "SpiNNUtilities.egg-info")
if os.path.isdir(egg_dir):
distutils.dir_util.remove_tree(egg_dir)
setup()