hapc 0.1.1__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {hapc-0.1.1 → hapc-0.1.3}/CMakeLists.txt +6 -1
  2. {hapc-0.1.1/python/hapc.egg-info → hapc-0.1.3}/PKG-INFO +3 -4
  3. {hapc-0.1.1 → hapc-0.1.3}/pyproject.toml +2 -3
  4. {hapc-0.1.1 → hapc-0.1.3}/python/hapc/__init__.py +1 -1
  5. {hapc-0.1.1 → hapc-0.1.3/python/hapc.egg-info}/PKG-INFO +3 -4
  6. {hapc-0.1.1 → hapc-0.1.3}/setup.py +48 -25
  7. {hapc-0.1.1 → hapc-0.1.3}/LICENSE +0 -0
  8. {hapc-0.1.1 → hapc-0.1.3}/MANIFEST.in +0 -0
  9. {hapc-0.1.1 → hapc-0.1.3}/README.md +0 -0
  10. {hapc-0.1.1 → hapc-0.1.3}/python/demo_single.py +0 -0
  11. {hapc-0.1.1 → hapc-0.1.3}/python/hapc/core.py +0 -0
  12. {hapc-0.1.1 → hapc-0.1.3}/python/hapc/cv.py +0 -0
  13. {hapc-0.1.1 → hapc-0.1.3}/python/hapc/single.py +0 -0
  14. {hapc-0.1.1 → hapc-0.1.3}/python/hapc.egg-info/SOURCES.txt +0 -0
  15. {hapc-0.1.1 → hapc-0.1.3}/python/hapc.egg-info/dependency_links.txt +0 -0
  16. {hapc-0.1.1 → hapc-0.1.3}/python/hapc.egg-info/requires.txt +0 -0
  17. {hapc-0.1.1 → hapc-0.1.3}/python/hapc.egg-info/top_level.txt +0 -0
  18. {hapc-0.1.1 → hapc-0.1.3}/python/test_install.py +0 -0
  19. {hapc-0.1.1 → hapc-0.1.3}/setup.cfg +0 -0
  20. {hapc-0.1.1 → hapc-0.1.3}/src/bindings.cpp +0 -0
  21. {hapc-0.1.1 → hapc-0.1.3}/src/cross_kernel.cpp +0 -0
  22. {hapc-0.1.1 → hapc-0.1.3}/src/cv_classi.cpp +0 -0
  23. {hapc-0.1.1 → hapc-0.1.3}/src/cv_fast_pchal.cpp +0 -0
  24. {hapc-0.1.1 → hapc-0.1.3}/src/cv_fast_pchal_python.cpp +0 -0
  25. {hapc-0.1.1 → hapc-0.1.3}/src/fast_pchal.cpp +0 -0
  26. {hapc-0.1.1 → hapc-0.1.3}/src/hapc_core.hpp +0 -0
  27. {hapc-0.1.1 → hapc-0.1.3}/src/logistic_call.cpp +0 -0
  28. {hapc-0.1.1 → hapc-0.1.3}/src/mkernel.cpp +0 -0
  29. {hapc-0.1.1 → hapc-0.1.3}/src/pcghal_call.cpp +0 -0
  30. {hapc-0.1.1 → hapc-0.1.3}/src/pcghal_classi_call.cpp +0 -0
  31. {hapc-0.1.1 → hapc-0.1.3}/src/pcghal_cv.cpp +0 -0
  32. {hapc-0.1.1 → hapc-0.1.3}/src/pcghal_cv_cpp.cpp +0 -0
  33. {hapc-0.1.1 → hapc-0.1.3}/src/pchal_design.cpp +0 -0
  34. {hapc-0.1.1 → hapc-0.1.3}/src/r_bindings.cpp +0 -0
  35. {hapc-0.1.1 → hapc-0.1.3}/src/ridge_wrappers.cpp +0 -0
  36. {hapc-0.1.1 → hapc-0.1.3}/src/single_pcghal.cpp +0 -0
  37. {hapc-0.1.1 → hapc-0.1.3}/src/single_pcghal_cpp.cpp +0 -0
  38. {hapc-0.1.1 → hapc-0.1.3}/src/single_pchar.cpp +0 -0
  39. {hapc-0.1.1 → hapc-0.1.3}/tests/test_api.py +0 -0
  40. {hapc-0.1.1 → hapc-0.1.3}/tests/test_core.py +0 -0
  41. {hapc-0.1.1 → hapc-0.1.3}/tests/test_r_vs_python_alpha.py +0 -0
@@ -4,11 +4,16 @@ project(hapc)
4
4
  set(CMAKE_CXX_STANDARD 17)
5
5
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
6
 
7
+ # Windows: Add vcpkg to CMAKE_PREFIX_PATH if it exists
8
+ if(WIN32 AND EXISTS "C:/vcpkg")
9
+ list(APPEND CMAKE_PREFIX_PATH "C:/vcpkg/installed/x64-windows")
10
+ endif()
11
+
7
12
  # Find Python
8
13
  find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
9
14
 
10
15
  # Find Eigen3
11
- find_package(Eigen3 3.3 REQUIRED NO_MODULE)
16
+ find_package(Eigen3 REQUIRED NO_MODULE)
12
17
 
13
18
  # Find pybind11 via Python
14
19
  execute_process(
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hapc
3
- Version: 0.1.1
4
- Summary: Hierarchical Additive Polynomial Complexity regression
5
- Home-page: https://github.com/yourusername/hapc
3
+ Version: 0.1.3
4
+ Summary: Highly Adaptive Principal Components
5
+ Home-page: https://github.com/meixide/hapc
6
6
  Author: Carlos García Meixide
7
7
  Author-email: Carlos García Meixide <cgmeixide@gmail.com>
8
8
  License: MIT
@@ -16,7 +16,6 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
- Classifier: License :: OSI Approved :: MIT License
20
19
  Classifier: Operating System :: OS Independent
21
20
  Requires-Python: >=3.8
22
21
  Description-Content-Type: text/markdown
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hapc"
7
- version = "0.1.1"
8
- description = "Hierarchical Additive Polynomial Complexity regression"
7
+ version = "0.1.3"
8
+ description = "Highly Adaptive Principal Components"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
11
11
  authors = [
@@ -19,7 +19,6 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3.10",
20
20
  "Programming Language :: Python :: 3.11",
21
21
  "Programming Language :: Python :: 3.12",
22
- "License :: OSI Approved :: MIT License",
23
22
  "Operating System :: OS Independent",
24
23
  ]
25
24
  dependencies = [
@@ -1,6 +1,6 @@
1
1
  """HAPC: Highly Adaptive Principal Components."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "0.1.2"
4
4
 
5
5
  from .core import (
6
6
  pchal_design,
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hapc
3
- Version: 0.1.1
4
- Summary: Hierarchical Additive Polynomial Complexity regression
5
- Home-page: https://github.com/yourusername/hapc
3
+ Version: 0.1.3
4
+ Summary: Highly Adaptive Principal Components
5
+ Home-page: https://github.com/meixide/hapc
6
6
  Author: Carlos García Meixide
7
7
  Author-email: Carlos García Meixide <cgmeixide@gmail.com>
8
8
  License: MIT
@@ -16,7 +16,6 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
- Classifier: License :: OSI Approved :: MIT License
20
19
  Classifier: Operating System :: OS Independent
21
20
  Requires-Python: >=3.8
22
21
  Description-Content-Type: text/markdown
@@ -40,11 +40,51 @@ class CMakeBuild(build_ext):
40
40
  lib_dir.mkdir(parents=True, exist_ok=True)
41
41
 
42
42
  import glob
43
- for lib in glob.glob(os.path.join(str(build_temp), "hapc_core.*")):
44
- import shutil
45
- dest = lib_dir / Path(lib).name
46
- shutil.copy2(lib, dest)
47
- print(f"Copied {lib} to {dest}")
43
+ import shutil
44
+ import time
45
+
46
+ # Search recursively for the built library
47
+ # Try multiple patterns to ensure we find it on all platforms
48
+ search_patterns = [
49
+ os.path.join(str(build_temp), "**", "hapc_core.*"),
50
+ os.path.join(str(build_temp), "**", "*", "hapc_core.*"),
51
+ os.path.join(str(build_temp), "**", "*", "*", "hapc_core.*"),
52
+ ]
53
+
54
+ found = False
55
+ for pattern in search_patterns:
56
+ for lib in glob.glob(pattern, recursive=True):
57
+ if lib.endswith(('.pyd', '.so', '.dylib')):
58
+ try:
59
+ dest = lib_dir / Path(lib).name
60
+ # Retry on Windows if file is locked
61
+ max_retries = 3
62
+ for attempt in range(max_retries):
63
+ try:
64
+ shutil.copy2(lib, dest)
65
+ print(f"[OK] Copied {lib} to {dest}")
66
+ found = True
67
+ break
68
+ except (OSError, PermissionError) as e:
69
+ if attempt < max_retries - 1:
70
+ time.sleep(0.5)
71
+ else:
72
+ raise
73
+ if found:
74
+ break
75
+ except Exception as e:
76
+ print(f"Warning: Failed to copy {lib}: {e}")
77
+ if found:
78
+ break
79
+
80
+ if not found:
81
+ print(f"ERROR: No compiled library found in build directory {build_temp}")
82
+ print(f" Searched for: hapc_core.pyd (Windows), hapc_core.so (Linux), hapc_core.dylib (macOS)")
83
+ raise RuntimeError("Failed to locate compiled hapc_core extension")
84
+
85
+ # Don't call parent run() to avoid setuptools trying to clean Windows locked files
86
+ # Just mark as complete
87
+ self.build_libs = []
48
88
 
49
89
  # Try to read version, fallback to default
50
90
  version = "0.1.0"
@@ -66,34 +106,17 @@ if readme_file.exists():
66
106
  setup(
67
107
  name="hapc",
68
108
  version=version,
69
- description="Hierarchical Additive Polynomial Complexity regression",
109
+ description="Highly Adaptive Principal Components",
70
110
  long_description=readme_content,
71
111
  long_description_content_type="text/markdown",
72
112
  author="Carlos García Meixide",
73
- author_email="your.email@example.com",
74
- url="https://github.com/yourusername/hapc",
113
+ author_email="cgmeixide@gmail.com",
114
+ url="https://github.com/meixide/hapc",
75
115
  license="MIT",
76
116
  packages=find_packages(where="python"),
77
117
  package_dir={"": "python"},
78
118
  ext_modules=[Extension("hapc._core", [])],
79
119
  cmdclass={"build_ext": CMakeBuild},
80
- install_requires=[
81
- "numpy>=1.24,<2.3",
82
- "scipy>=1.7",
83
- "scikit-learn>=0.24",
84
- ],
85
- extras_require={
86
- "dev": ["pytest", "pytest-cov"],
87
- },
88
120
  python_requires=">=3.8",
89
- classifiers=[
90
- "Programming Language :: Python :: 3",
91
- "Programming Language :: Python :: 3.8",
92
- "Programming Language :: Python :: 3.9",
93
- "Programming Language :: Python :: 3.10",
94
- "Programming Language :: Python :: 3.11",
95
- "License :: OSI Approved :: MIT License",
96
- "Operating System :: OS Independent",
97
- ],
98
121
  include_package_data=True,
99
122
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes