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

feat: Add numpy 2.X build and support for python 3.10+ #27

Merged
merged 2 commits into from
Oct 23, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build package
run: |
python -m pip install . -v
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ wheels/
.installed.cfg
*.egg
.tox/

*.whl
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down
23 changes: 11 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[build-system]
requires = [
"setuptools>=51.0",
"wheel>=0.36",
"numpy==1.22"
"setuptools>=65.5.0",
"wheel>=0.40",
"numpy>=2.0"
]
build-backend = "setuptools.build_meta"

[project]
name = "lttbc"
version = "0.2.4"
description ="Largest triangle three buckets module for Python written in C"
version = "0.3.0"
description = "Largest triangle three buckets module for Python written in C"
dynamic = ["readme"]
requires-python = ">=3.8"
requires-python = ">=3.10"
authors = [
{name = "European XFEL GmbH", email = "[email protected]"}
{ name = "European XFEL GmbH", email = "[email protected]" }
]
maintainers = [
{name = "Dennis Goeries", email = "[email protected]"},
{ name = "Dennis Goeries", email = "[email protected]" },
]
dependencies = [
"numpy>=1.22",
"numpy>=2.0",
]
license = {text = "MIT"}
license = { text = "MIT" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -38,6 +38,5 @@ classifiers = [
[project.urls]
"git" = "https://github.com/dgoeries/lttbc"


[tool.setuptools.dynamic]
readme = {file = ["README.txt"], content-type = "text/markdown"}
readme = { file = ["README.md"], content-type = "text/markdown" }
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

11 changes: 1 addition & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
#!/usr/bin/env python
import os.path as osp
import sys

from setuptools import Extension, setup


def get_script_path():
return osp.dirname(osp.realpath(sys.argv[0]))


class numpy_get_include:
def __str__(self):
import numpy
Expand All @@ -18,10 +11,8 @@ def __str__(self):
lttbc_py = Extension("lttbc", sources=["lttbc.c"],
define_macros=[
("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=[numpy_get_include(),
get_script_path()],
include_dirs=[numpy_get_include()],
)

setup(
ext_modules=[lttbc_py],
)
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[tox]
envlist = py38,py39,py310,py311
envlist = py310,py311,py312,py313

[testenv]
deps =
pytest
-requirements.txt
numpy
setuptools

commands =
pip wheel .
python setup.py build
pytest -v
Loading