Skip to content

Commit 001adf5

Browse files
committed
0.0.2.3
1 parent a3b6679 commit 001adf5

6 files changed

Lines changed: 122 additions & 39 deletions

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@
3434
*.out
3535
*.app
3636

37+
####################################
38+
# Custom
39+
####################################
40+
3741
/dist
3842

3943
/build
4044

45+
/.temp_sdist
46+
4147
####################################
4248
# Python
4349
####################################

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1-
0.0.1: (6/30/2025) First working Version
2-
0.0.2: problematic
3-
0.0.2.1:
1+
## 0.0.1: (6/30/2025) First working Version
2+
### ~~0.0.2:~~ problematic
3+
### ~~0.0.2.1:~~ problematic
4+
### ~~0.0.2.2:~~ problematic
5+
## 0.0.2.3: Optimized GL implementation with FFT acceleration
6+
7+
bench_1 Result:
8+
9+
| time | GL | RL |
10+
| ---- | ----------- | ----------- |
11+
| 1+e2 | 0.0482 ms | * |
12+
| 1+e3 | 5.6009 ms | 0.9822 ms |
13+
| 1+e4 | 605.5952 ms | 5.2982 ms |
14+
| 1+e5 | * | 104.1740 ms |
15+
| 1+e6 | * | 667.7444 ms |

CMakeLists.txt

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.15)
22

3-
project(differintC VERSION 0.0.2.1 LANGUAGES CXX)
3+
project(differintC VERSION 0.0.2.3 LANGUAGES CXX)
44

55
# Set compiler optimization flags
66
if(MSVC)
@@ -13,28 +13,44 @@ set(CMAKE_CXX_STANDARD 17)
1313
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1414

1515
# Robust FFTW setup
16-
set(FFTW_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fftw")
16+
# set(FFTW_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/fftw")
17+
# set(FFTW_INCLUDE_DIRS "${FFTW_ROOT}/include")
18+
#
19+
# # Check if we're in a temporary build directory
20+
# if(NOT EXISTS "${FFTW_ROOT}/lib/libfftw3-3.lib")
21+
# # Try to find FFTW in the source directory
22+
# set(FFTW_ROOT_SOURCE "${CMAKE_SOURCE_DIR}/thirdparty/fftw")
23+
# if(EXISTS "${FFTW_ROOT_SOURCE}/lib/libfftw3-3.lib")
24+
# set(FFTW_ROOT "${FFTW_ROOT_SOURCE}")
25+
# set(FFTW_INCLUDE_DIRS "${FFTW_ROOT}/include")
26+
# message(STATUS "Using source FFTW directory: ${FFTW_ROOT}")
27+
# else()
28+
# # Fallback to system FFTW
29+
# find_package(FFTW)
30+
# if(FFTW_FOUND)
31+
# message(STATUS "Using system FFTW")
32+
# set(FFTW_LIBRARIES ${FFTW_LIBRARIES})
33+
# else()
34+
# message(FATAL_ERROR "FFTW not found! Please install FFTW or check the thirdparty directory.")
35+
# endif()
36+
# endif()
37+
# endif()
38+
39+
# Use bundled FFTW from thirdparty
40+
set(FFTW_ROOT "${CMAKE_SOURCE_DIR}/thirdparty/fftw")
1741
set(FFTW_INCLUDE_DIRS "${FFTW_ROOT}/include")
1842

19-
# Check if we're in a temporary build directory
20-
if(NOT EXISTS "${FFTW_ROOT}/lib/libfftw3-3.lib")
21-
# Try to find FFTW in the source directory
22-
set(FFTW_ROOT_SOURCE "${CMAKE_SOURCE_DIR}/thirdparty/fftw")
23-
if(EXISTS "${FFTW_ROOT_SOURCE}/lib/libfftw3-3.lib")
24-
set(FFTW_ROOT "${FFTW_ROOT_SOURCE}")
25-
set(FFTW_INCLUDE_DIRS "${FFTW_ROOT}/include")
26-
message(STATUS "Using source FFTW directory: ${FFTW_ROOT}")
27-
else()
28-
# Fallback to system FFTW
29-
find_package(FFTW)
30-
if(FFTW_FOUND)
31-
message(STATUS "Using system FFTW")
32-
set(FFTW_LIBRARIES ${FFTW_LIBRARIES})
33-
else()
34-
message(FATAL_ERROR "FFTW not found! Please install FFTW or check the thirdparty directory.")
35-
endif()
36-
endif()
43+
if(WIN32)
44+
set(FFTW_LIBRARIES "${FFTW_ROOT}/lib/libfftw3-3.lib")
45+
else()
46+
set(FFTW_LIBRARIES "${FFTW_ROOT}/lib/libfftw3.so")
47+
endif()
48+
49+
# Optional sanity check
50+
if(NOT EXISTS "${FFTW_LIBRARIES}")
51+
message(FATAL_ERROR "Missing FFTW library at: ${FFTW_LIBRARIES}")
3752
endif()
53+
##########################################
3854

3955

4056
if(WIN32)

MANIFEST.in

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
1-
include thirdparty/fftw/bin/libfftw3-3.dll
2-
include thirdparty/fftw/lib/libfftw3-3.lib
3-
include thirdparty/fftw/include/fftw3.h
4-
recursive-include differintC *
1+
# Include essential files
2+
include pyproject.toml
3+
include README.md
4+
include LICENSE
5+
include MANIFEST.in
6+
7+
# Include the package source
8+
recursive-include differintC *.py *.dll
9+
10+
# Include headers and C++ source
11+
recursive-include include *.hpp
12+
recursive-include src *.cpp
13+
recursive-include python *.cpp *.h CMakeLists.txt
14+
15+
# Include examples and tests (optional)
16+
# recursive-include examples *.ipynb
17+
# recursive-include tests *.py *.cpp
18+
19+
# Explicitly exclude build artifacts and binaries
20+
prune build
21+
prune dist
22+
prune differintC.egg-info
23+
prune wheel_inspect
24+
25+
# ⚠️ Remove all of thirdparty/fftw and its binaries from sdist
26+
prune thirdparty/fftw
27+
28+
# Also remove static linking files not needed at runtime
29+
exclude differintC/*.lib
30+
exclude differintC/*.exp
31+
exclude differintC/*.def
32+
exclude *.exe

differintC/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ def _load_dll():
7777
from ._differintC import * # type: ignore # Directly import from site-packages
7878

7979
# Add version attribute
80-
__version__ = "0.0.2.1"
80+
__version__ = "0.0.2.3"

pyproject.toml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build-backend = "scikit_build_core.build"
1010

1111
[project]
1212
name = "differintC"
13-
version = "0.0.2.1"
13+
version = "0.0.2.3"
1414
description = "Fast C++ implementation of fractional calculus operators via pybind11"
1515
authors = [{ name = "Parsa Roshanak" }]
1616
license = { text = "MIT" }
@@ -40,20 +40,41 @@ Issues = "https://github.com/iparsw/differintC/issues"
4040
wheel.packages = ["differintC"]
4141
build-dir = "build"
4242
build.verbose = true
43-
sdist.include = [
44-
"src",
45-
"include",
46-
"python",
47-
"thirdparty/fftw", # Include entire FFTW directory
48-
"differintC",
49-
"differintC/libfftw3-3.dll", # Explicitly include DLL
50-
"CMakeLists.txt",
51-
"README.md",
43+
install.components = ["python"]
44+
45+
46+
47+
[tool.scikit-build.sdist]
48+
# Explicitly list what should go in sdist
49+
include = [
50+
"differintC/**",
51+
"include/**",
52+
"src/**",
53+
"python/**",
54+
#"examples/**",
55+
#"tests/**",
56+
"README.MD",
57+
"pyproject.toml",
5258
"LICENSE",
59+
"CHANGELOG.md",
60+
"thirdparty/fftw/lib/libfftw3-3.lib",
61+
"thirdparty/fftw/bin/libfftw3-3.dll",
62+
"thirdparty/fftw/include/fftw3.h"
5363
]
54-
install.components = ["python"]
5564

5665

66+
# Explicitly exclude binary & third-party build junk
67+
exclude = [
68+
"thirdparty/**",
69+
"differintC/*.lib",
70+
"differintC/*.exp",
71+
"differintC/*.def",
72+
"*.exe",
73+
"*.pyd",
74+
"*.so",
75+
"*.dll"
76+
]
77+
5778
[tool.scikit-build.cmake]
5879
args = [
5980
"-DFFTW_ROOT=thirdparty/fftw",

0 commit comments

Comments
 (0)