hapc 0.1.1__tar.gz → 0.1.2__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.2}/CMakeLists.txt +6 -1
  2. {hapc-0.1.1/python/hapc.egg-info → hapc-0.1.2}/PKG-INFO +4 -4
  3. {hapc-0.1.1 → hapc-0.1.2}/pyproject.toml +2 -3
  4. {hapc-0.1.1 → hapc-0.1.2}/python/hapc/__init__.py +1 -1
  5. {hapc-0.1.1 → hapc-0.1.2/python/hapc.egg-info}/PKG-INFO +4 -4
  6. {hapc-0.1.1 → hapc-0.1.2}/setup.py +33 -24
  7. {hapc-0.1.1 → hapc-0.1.2}/LICENSE +0 -0
  8. {hapc-0.1.1 → hapc-0.1.2}/MANIFEST.in +0 -0
  9. {hapc-0.1.1 → hapc-0.1.2}/README.md +0 -0
  10. {hapc-0.1.1 → hapc-0.1.2}/python/demo_single.py +0 -0
  11. {hapc-0.1.1 → hapc-0.1.2}/python/hapc/core.py +0 -0
  12. {hapc-0.1.1 → hapc-0.1.2}/python/hapc/cv.py +0 -0
  13. {hapc-0.1.1 → hapc-0.1.2}/python/hapc/single.py +0 -0
  14. {hapc-0.1.1 → hapc-0.1.2}/python/hapc.egg-info/SOURCES.txt +0 -0
  15. {hapc-0.1.1 → hapc-0.1.2}/python/hapc.egg-info/dependency_links.txt +0 -0
  16. {hapc-0.1.1 → hapc-0.1.2}/python/hapc.egg-info/requires.txt +0 -0
  17. {hapc-0.1.1 → hapc-0.1.2}/python/hapc.egg-info/top_level.txt +0 -0
  18. {hapc-0.1.1 → hapc-0.1.2}/python/test_install.py +0 -0
  19. {hapc-0.1.1 → hapc-0.1.2}/setup.cfg +0 -0
  20. {hapc-0.1.1 → hapc-0.1.2}/src/bindings.cpp +0 -0
  21. {hapc-0.1.1 → hapc-0.1.2}/src/cross_kernel.cpp +0 -0
  22. {hapc-0.1.1 → hapc-0.1.2}/src/cv_classi.cpp +0 -0
  23. {hapc-0.1.1 → hapc-0.1.2}/src/cv_fast_pchal.cpp +0 -0
  24. {hapc-0.1.1 → hapc-0.1.2}/src/cv_fast_pchal_python.cpp +0 -0
  25. {hapc-0.1.1 → hapc-0.1.2}/src/fast_pchal.cpp +0 -0
  26. {hapc-0.1.1 → hapc-0.1.2}/src/hapc_core.hpp +0 -0
  27. {hapc-0.1.1 → hapc-0.1.2}/src/logistic_call.cpp +0 -0
  28. {hapc-0.1.1 → hapc-0.1.2}/src/mkernel.cpp +0 -0
  29. {hapc-0.1.1 → hapc-0.1.2}/src/pcghal_call.cpp +0 -0
  30. {hapc-0.1.1 → hapc-0.1.2}/src/pcghal_classi_call.cpp +0 -0
  31. {hapc-0.1.1 → hapc-0.1.2}/src/pcghal_cv.cpp +0 -0
  32. {hapc-0.1.1 → hapc-0.1.2}/src/pcghal_cv_cpp.cpp +0 -0
  33. {hapc-0.1.1 → hapc-0.1.2}/src/pchal_design.cpp +0 -0
  34. {hapc-0.1.1 → hapc-0.1.2}/src/r_bindings.cpp +0 -0
  35. {hapc-0.1.1 → hapc-0.1.2}/src/ridge_wrappers.cpp +0 -0
  36. {hapc-0.1.1 → hapc-0.1.2}/src/single_pcghal.cpp +0 -0
  37. {hapc-0.1.1 → hapc-0.1.2}/src/single_pcghal_cpp.cpp +0 -0
  38. {hapc-0.1.1 → hapc-0.1.2}/src/single_pchar.cpp +0 -0
  39. {hapc-0.1.1 → hapc-0.1.2}/tests/test_api.py +0 -0
  40. {hapc-0.1.1 → hapc-0.1.2}/tests/test_core.py +0 -0
  41. {hapc-0.1.1 → hapc-0.1.2}/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,11 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hapc
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Hierarchical Additive Polynomial Complexity regression
5
- Home-page: https://github.com/yourusername/hapc
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
- License: MIT
8
+ License: YEAR: 2025
9
+ COPYRIGHT HOLDER: Carlos García Meixide
9
10
  Project-URL: Homepage, https://github.com/meixide/hapc
10
11
  Project-URL: Documentation, https://github.com/meixide/hapc#readme
11
12
  Project-URL: Repository, https://github.com/meixide/hapc.git
@@ -16,7 +17,6 @@ Classifier: Programming Language :: Python :: 3.9
16
17
  Classifier: Programming Language :: Python :: 3.10
17
18
  Classifier: Programming Language :: Python :: 3.11
18
19
  Classifier: Programming Language :: Python :: 3.12
19
- Classifier: License :: OSI Approved :: MIT License
20
20
  Classifier: Operating System :: OS Independent
21
21
  Requires-Python: >=3.8
22
22
  Description-Content-Type: text/markdown
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hapc"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Hierarchical Additive Polynomial Complexity regression"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
11
11
  authors = [
12
12
  {name = "Carlos García Meixide", email = "cgmeixide@gmail.com"}
13
13
  ]
14
- license = {text = "MIT"}
14
+ license = {file = "LICENSE"}
15
15
  classifiers = [
16
16
  "Programming Language :: Python :: 3",
17
17
  "Programming Language :: Python :: 3.8",
@@ -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,11 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hapc
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Hierarchical Additive Polynomial Complexity regression
5
- Home-page: https://github.com/yourusername/hapc
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
- License: MIT
8
+ License: YEAR: 2025
9
+ COPYRIGHT HOLDER: Carlos García Meixide
9
10
  Project-URL: Homepage, https://github.com/meixide/hapc
10
11
  Project-URL: Documentation, https://github.com/meixide/hapc#readme
11
12
  Project-URL: Repository, https://github.com/meixide/hapc.git
@@ -16,7 +17,6 @@ Classifier: Programming Language :: Python :: 3.9
16
17
  Classifier: Programming Language :: Python :: 3.10
17
18
  Classifier: Programming Language :: Python :: 3.11
18
19
  Classifier: Programming Language :: Python :: 3.12
19
- Classifier: License :: OSI Approved :: MIT License
20
20
  Classifier: Operating System :: OS Independent
21
21
  Requires-Python: >=3.8
22
22
  Description-Content-Type: text/markdown
@@ -40,11 +40,37 @@ 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
+ found = False
48
+ for lib in glob.glob(os.path.join(str(build_temp), "**", "hapc_core.*"), recursive=True):
49
+ if lib.endswith(('.pyd', '.so', '.dylib')):
50
+ try:
51
+ dest = lib_dir / Path(lib).name
52
+ # Retry on Windows if file is locked
53
+ max_retries = 3
54
+ for attempt in range(max_retries):
55
+ try:
56
+ shutil.copy2(lib, dest)
57
+ print(f"Copied {lib} to {dest}")
58
+ found = True
59
+ break
60
+ except (OSError, PermissionError) as e:
61
+ if attempt < max_retries - 1:
62
+ time.sleep(0.5)
63
+ else:
64
+ raise
65
+ except Exception as e:
66
+ print(f"Warning: Failed to copy {lib}: {e}")
67
+
68
+ if not found:
69
+ print("Warning: No compiled library found in build directory")
70
+
71
+ # Don't call parent run() to avoid setuptools trying to clean Windows locked files
72
+ # Just mark as complete
73
+ self.build_libs = []
48
74
 
49
75
  # Try to read version, fallback to default
50
76
  version = "0.1.0"
@@ -70,30 +96,13 @@ setup(
70
96
  long_description=readme_content,
71
97
  long_description_content_type="text/markdown",
72
98
  author="Carlos García Meixide",
73
- author_email="your.email@example.com",
74
- url="https://github.com/yourusername/hapc",
99
+ author_email="cgmeixide@gmail.com",
100
+ url="https://github.com/meixide/hapc",
75
101
  license="MIT",
76
102
  packages=find_packages(where="python"),
77
103
  package_dir={"": "python"},
78
104
  ext_modules=[Extension("hapc._core", [])],
79
105
  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
106
  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
107
  include_package_data=True,
99
108
  )
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