Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ lextab.py
yacctab.py
.pytest_cache/*

loopy/_git_rev.py

.cache
.env
virtualenv-[0-9]*[0-9]
Expand Down
Empty file added loopy/py.typed
Empty file.
33 changes: 8 additions & 25 deletions loopy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,16 @@
"""


# {{{ find install- or run-time git revision
import re
from importlib import metadata

import os

VERSION_TEXT = metadata.version("loopy")
_match = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT)
assert _match is not None
VERSION_STATUS = _match.group(2)
VERSION = tuple(int(nr) for nr in _match.group(1).split("."))

if os.environ.get("AKPYTHON_EXEC_IMPORT_UNAVAILABLE") is not None:
# We're just being exec'd by setup.py. We can't import anything.
_git_rev = None

else:
import loopy._git_rev as _git_rev_mod # pylint: disable=no-name-in-module,import-error # noqa: E501
_git_rev = _git_rev_mod.GIT_REVISION

# If we're running from a dev tree, the last install (and hence the most
# recent update of the above git rev) could have taken place very long ago.
from pytools import find_module_git_revision
_runtime_git_rev = find_module_git_revision(__file__, n_levels_up=1)
if _runtime_git_rev is not None:
_git_rev = _runtime_git_rev

# }}}


VERSION = (2024, 1)
VERSION_STATUS = ""
VERSION_TEXT = ".".join(str(x) for x in VERSION) + VERSION_STATUS

try:
import islpy.version
Expand All @@ -62,8 +46,7 @@
else:
_cgen_version = cgen.version.VERSION_TEXT

DATA_MODEL_VERSION = "{}-islpy{}-cgen{}-{}-v1".format(
VERSION_TEXT, _islpy_version, _cgen_version, _git_rev)
DATA_MODEL_VERSION = f"{VERSION_TEXT}-islpy{_islpy_version}-cgen{_cgen_version}-v1"


FALLBACK_LANGUAGE_VERSION = (2018, 2)
Expand Down
77 changes: 77 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,80 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=63",
]

[project]
name = "loopy"
version = "2024.1"
description = "A code generator for array-based code on CPUs and GPUs"
readme = "README.rst"
license = { text = "MIT" }
authors = [
{ name = "Andreas Kloeckner", email = "inform@tiker.net" },
]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
]
dependencies = [
"pytools>=2024.1.5",
"pymbolic>=2022.1",
"genpy>=2016.1.2",

# https://github.com/inducer/loopy/pull/419
"numpy>=1.19",

"cgen>=2016.1",
"islpy>=2019.1",
"codepy>=2017.1",
"colorama",
"Mako",
"pyrsistent",
"immutables",
"typing_extensions",
]
[project.optional-dependencies]
pyopencl = [
"pyopencl>=2022.3",
]
fortran = [
# Note that this is *not* regular 'f2py2e', this is
# the Fortran parser from the (unfinished) third-edition
# f2py, as linked below. This package is not on the package index, AFAIK.
# -AK, 2024-08-02
"f2py @ git+https://github.com/pearu/f2py.git",
"ply>=3.6",
]

[project.scripts]

[project.urls]
Documentation = "https://documen.tician.de/loopy"
Homepage = "https://github.com/inducer/loopy"

[tool.setuptools.packages.find]
include = [
"loopy*",
]

[tool.setuptools.package-data]
loopy = [
"py.typed",
]

[tool.ruff]
preview = true
Expand Down
130 changes: 0 additions & 130 deletions setup.py

This file was deleted.