Skip to content
Open
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
6 changes: 1 addition & 5 deletions .github/workflows/python-test-with-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Python dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Python test
env:
CC: ${{ matrix.compiler }}
Expand All @@ -35,7 +31,7 @@ jobs:
make info
make -j2
export CEED_DIR=$PWD
pip install .
pip install '.[test]'
cd python/tests
PYTHON=python3 make test TEST_OPTS="--ceed /cpu/self/ref/serial -vv"
cd ../../examples/python
Expand Down
60 changes: 58 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,72 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel", "cffi"]
requires = ["setuptools>=77.0.0", "wheel", "cffi>=1.0.0"]
build-backend = "setuptools.build_meta"

[tool.autopep8]
max_line_length = 80

[tool.cibuildwheel]
build-verbosity = "1"
build-verbosity = 1
test-requires = ["pytest"]
test-command = "bash {project}/python/test-wheel.sh {project}"
skip = "cp36-* cp37-* pp37-* *-manylinux_i686 *_ppc64le *_s390x *-musllinux*"

[tool.cibuildwheel.linux]
manylinux-x86_64-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"

[tool.setuptools]
package-dir = { "libceed" = "python" }
include-package-data = true
platforms = ["POSIX"]

[project]
name="libceed"
description="libCEED: Code for Efficient Extensible Discretization"
authors = [
{name="libCEED Team", email="[email protected]"}
]
readme = "python/README.md"
license = "BSD-2-Clause"
license-files = ["LICENSE"]
dependencies = [
"cffi>=1.0.0",
"numpy"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: POSIX",
"Programming Language :: C",
"Programming Language :: C++",
"Programming Language :: Fortran",
"Programming Language :: Python",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
]
keywords = ["libCEED"]
dynamic = [
"version"
]

[project.urls]
Homepage = "https://libceed.org"
Download = "https://github.com/CEED/libCEED/releases"
Repository = "https://github.com/CEED/libCEED"
Documentation = "https://libceed.org"
Issues = "https://github.com/CEED/libCEED/issues"

[project.optional-dependencies]
cuda = ['numba']
test = [
'autopep8',
'pytest',
'setuptools',
'vermin',
]
10 changes: 9 additions & 1 deletion python/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# libCEED for Python
# libCEED: Code for Efficient Extensible Discretization

libCEED is a lightweight library for expressing and manipulating operators that arise in high-order element-based discretization of partial differential equations.
libCEED's representations are much for efficient than assembled sparse matrices, and can achieve very high performance on modern CPU and GPU hardware.
This approach is applicable to a broad range of linear and nonlinear problems, and includes facilities for preconditioning.
libCEED is meant to be easy to incorporate into existing libraries and applications, and to build new tools on top of.

libCEED has been developed as part of the DOE Exascale Computing Project
co-design Center for Efficient Exascale Discretizations (CEED).

## Install

Expand Down
1 change: 0 additions & 1 deletion requirements-gpu.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements-test.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

80 changes: 6 additions & 74 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# testbed platforms, in support of the nation"s exascale computing imperative.
# pylint: disable=no-name-in-module,import-error,unused-variable
import os
from setuptools import setup
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext

# ------------------------------------------------------------------------------
Expand All @@ -30,11 +30,6 @@ def version():
return ceed_version[0]


def requirements():
with open('requirements.txt') as f:
return f.readlines()


class libceed_build_ext(build_ext):
def run(self):
prefix = os.path.join(self.build_lib, 'libceed')
Expand All @@ -58,74 +53,11 @@ def make_libceed_so(self, prefix):
])


description = """
libCEED: Code for Efficient Extensible Discretization
=====================================================

libCEED is a lightweight library for expressing and manipulating operators that
arise in high-order element-based discretization of partial differential
equations. libCEED's representations are much for efficient than assembled
sparse matrices, and can achieve very high performance on modern CPU and GPU
hardware. This approach is applicable to a broad range of linear and nonlinear
problems, and includes facilities for preconditioning. libCEED is meant to be
easy to incorporate into existing libraries and applications, and to build new
tools on top of.

libCEED has been developed as part of the DOE Exascale Computing Project
co-design Center for Efficient Exascale Discretizations (CEED).
"""

classifiers = """
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Operating System :: POSIX
Programming Language :: C
Programming Language :: C++
Programming Language :: Fortran
Programming Language :: Python
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3 :: Only
Topic :: Scientific/Engineering
Topic :: Software Development :: Libraries
"""

setup(name="libceed",
version=version(),
description="libCEED: Code for Efficient Extensible Discretization",
long_description=description,
long_description_content_type='text/x-rst',
classifiers=classifiers.split("\n")[1:-1],
keywords=["libCEED"],
platforms=["POSIX"],
license="BSD 2",
license_file='LICENSE',
url="https://libceed.org",
download_url="https://github.com/CEED/libCEED/releases",
project_urls={
"Bug Tracker": "https://github.com/CEED/libCEED/issues",
"Documentation": "https://libceed.org",
"Source Code": "https://github.com/CEED/libCEED",
},
author="libCEED Team",
author_email="[email protected]",

install_requires=requirements(),
packages=["libceed"],
package_dir={"libceed": "python"},
include_package_data=True,

setup_requires=["cffi"],
cffi_modules=["python/build_ceed_cffi.py:ffibuilder"],
cmdclass={'build_ext': libceed_build_ext},
setup(
version=version(),
cffi_modules=["python/build_ceed_cffi.py:ffibuilder"],
cmdclass={'build_ext': libceed_build_ext},
)

extras_require={
'cuda': ['numba']
},
)

# ------------------------------------------------------------------------------