advanced-analytics-pkg 0.1.0__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.
@@ -0,0 +1 @@
1
+ include include/*.h
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: advanced_analytics_pkg
3
+ Version: 0.1.0
4
+ Summary: A C++ analytics extension using pybind11
5
+ Author: Your Name
6
+ Author-email: your@email.com
7
+ Description-Content-Type: text/markdown
8
+ Dynamic: author
9
+ Dynamic: author-email
10
+ Dynamic: description-content-type
11
+ Dynamic: summary
File without changes
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: advanced_analytics_pkg
3
+ Version: 0.1.0
4
+ Summary: A C++ analytics extension using pybind11
5
+ Author: Your Name
6
+ Author-email: your@email.com
7
+ Description-Content-Type: text/markdown
8
+ Dynamic: author
9
+ Dynamic: author-email
10
+ Dynamic: description-content-type
11
+ Dynamic: summary
@@ -0,0 +1,12 @@
1
+ MANIFEST.in
2
+ README.md
3
+ bindings.cpp
4
+ pyproject.toml
5
+ setup.py
6
+ advanced_analytics_pkg.egg-info/PKG-INFO
7
+ advanced_analytics_pkg.egg-info/SOURCES.txt
8
+ advanced_analytics_pkg.egg-info/dependency_links.txt
9
+ advanced_analytics_pkg.egg-info/not-zip-safe
10
+ advanced_analytics_pkg.egg-info/top_level.txt
11
+ include/analytics.h
12
+ src/analytics.cpp
@@ -0,0 +1 @@
1
+ advanced_analytics_pkg
@@ -0,0 +1,11 @@
1
+ #include <pybind11/pybind11.h>
2
+ #include <pybind11/stl.h> // Bridges Python list <-> std::vector
3
+ #include "analytics.h"
4
+
5
+ namespace py = pybind11;
6
+
7
+ PYBIND11_MODULE(advanced_analytics_pkg, m) {
8
+ py::class_<advancedanalytics>(m, "advancedanalytics")
9
+ .def(py::init<>())
10
+ .def("compute_mean", &advancedanalytics::compute_mean);
11
+ }
@@ -0,0 +1,12 @@
1
+ #ifndef ANALYTICS_H
2
+ #define ANALYTICS_H
3
+
4
+ #include <vector>
5
+
6
+ class advancedanalytics {
7
+ public:
8
+ advancedanalytics() = default; // Constructor
9
+ double compute_mean(const std::vector<double>& data);
10
+ };
11
+
12
+ #endif
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42", "wheel", "pybind11>=2.6.0"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,29 @@
1
+ from setuptools import setup
2
+ from pybind11.setup_helpers import Pybind11Extension, build_ext
3
+ import os
4
+
5
+ here = os.path.abspath(os.path.dirname(__file__))
6
+
7
+ ext_modules = [
8
+ Pybind11Extension(
9
+ "advanced_analytics_pkg",
10
+ ["bindings.cpp", "src/analytics.cpp"],
11
+ include_dirs=["include"], # Relative path to headers
12
+ language="c++",
13
+ ),
14
+ ]
15
+
16
+ setup(
17
+ name="advanced_analytics_pkg",
18
+ version="0.1.0",
19
+ author="Your Name",
20
+ author_email="your@email.com",
21
+ description="A C++ analytics extension using pybind11",
22
+ long_description=open(os.path.join(here, "README.md"), encoding="utf-8").read(),
23
+ long_description_content_type="text/markdown",
24
+ ext_modules=ext_modules,
25
+ cmdclass={"build_ext": build_ext},
26
+ zip_safe=False,
27
+ include_package_data=True, # Include files specified in MANIFEST.in
28
+ packages=[], # No Python packages in this example
29
+ )
@@ -0,0 +1,9 @@
1
+ #include "analytics.h"
2
+ #include <numeric>
3
+
4
+ double advancedanalytics::compute_mean(const std::vector<double>& data) {
5
+ if (data.empty()) return 0.0;
6
+
7
+ double sum = std::accumulate(data.begin(), data.end(), 0.0);
8
+ return sum / static_cast<double>(data.size());
9
+ }