{"id":27624300,"url":"https://github.com/gopalchand/hellothere_project","last_synced_at":"2026-04-29T19:33:12.621Z","repository":{"id":288662789,"uuid":"968835084","full_name":"gopalchand/hellothere_project","owner":"gopalchand","description":"Hello World using CMake","archived":false,"fork":false,"pushed_at":"2025-04-19T14:49:42.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T06:35:15.863Z","etag":null,"topics":["chatgpt-assisted","cmake","cmakelists","cpp","pybind11","python","python3","scikit-build"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gopalchand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-18T20:29:10.000Z","updated_at":"2025-04-19T14:49:45.000Z","dependencies_parsed_at":"2025-04-19T15:45:05.890Z","dependency_job_id":null,"html_url":"https://github.com/gopalchand/hellothere_project","commit_stats":null,"previous_names":["gopalchand/hello","gopalchand/hellothere_package"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gopalchand/hellothere_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalchand%2Fhellothere_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalchand%2Fhellothere_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalchand%2Fhellothere_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalchand%2Fhellothere_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gopalchand","download_url":"https://codeload.github.com/gopalchand/hellothere_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gopalchand%2Fhellothere_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt-assisted","cmake","cmakelists","cpp","pybind11","python","python3","scikit-build"],"created_at":"2025-04-23T11:28:25.579Z","updated_at":"2026-04-29T19:33:12.601Z","avatar_url":"https://github.com/gopalchand.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Python Tests](https://github.com/gopalchand/hellothere_project/actions/workflows/python-tests.yml/badge.svg)\n\n# hellothere_project\nAn example of a minimal Python \"Hello, World!\" project that can be installed using pip install from a GitHub repo — and uses CMake to build a native Python extension (e.g., a C++ backend).\nThis is often done when you want to integrate C++ performance into Python.\n\nTesting with Windows 11. Below are instructions of how this repo was set up including information/reminders for how to get started with with GitHub and repos.\n\nFolder Structure:\n```\nhellothere_project/\n├── CMakeLists.txt\n├── pyproject.toml\n├── setup.py\n├── src/\n│   ├── hello.cpp\n│   └── hello.hpp\n├── python/\n│   └── hellothere_package/\n│       ├── __init__.py\n│       └── hellothere_bindings.cpp\n```\n\n## 0. Preparation\nOptional installation of packages\n```\npip install --upgrade pip setuptools wheel\npip install scikit-build cmake ninja pybind11\n```\n\n## 1. Initialize Git (if not already done)\nThis creates a new repository - usually the first command for a new project\n```\ngit init\n```\n\n## 2. Add the remote origin (replace with your actual username!)\nAdd the remote repository to a local Git repository. \"origin\" is an alias for the remote repository URL that can b used subsequently\n```\ngit remote add origin https://github.com/gopalchand/hellothere_project.git\n```\nValidate with the following:\n```\ngit remote -v\norigin  https://github.com/gopalchand/hello.git (fetch)\norigin  https://github.com/gopalchand/hello.git (push)\n```\n\n## 3. Add and commit your files\nSelect changes using add and then commit *locally* using \"-m\" for the text associated with the change(s)\n```\ngit add .\ngit commit -m \"Initial commit with CMake Python extension\"\n```\n\n## 4. Push to GitHub\nRename the current branch to main and force-push it to GitHub (typically for first-time setup):\n```\ngit branch -M main\ngit push -f origin main\n```\n-f (force) intentionally overwrites the remote main branch.\n\n## 5. Change email to noreply email using https://www.github.com/emails for details\nIf you see the error \"Your push would publish a private email address.\" (see https://www.github.com/emails), use the appropriate noreply email and update the config:\n```\ngit config --global user.email \"12345678+yourusername@users.noreply.github.com\"\ngit commit --amend --reset-author\n```\n## 6. Push amny subsequent changes\nAfter editing files, stage the changes, commit with a meaningful message, and push:\n```\ngit add .\ngit commit -m \"change description\"\ngit push origin main\n```\n\n## 7. Install\n```\npip install git+https://github.com/gopalchand/hellothere_project.git\n```\n\n## 8. Typical output (Windows 11):\nThe pip install git+https://github.com/user/repo.git usually does the following:\n```\ngit clone https://github.com/user/repo.git \u003clocal_folder\u003e\n```\ncd into the \u003clocal_folder\u003e\nif there's a pyproject.toml present then install everything in the requires=[...] part and then call setuptools.build_meta which is patched by scikit-build. scikit_build runs CMake and Ninja to compile C++ code:\n```\ncmake -S . -B _skbuild/\u003cplatform\u003e-\u003cpython-version\u003e/cmake-build \\\n  -DCMAKE_INSTALL_PREFIX=_skbuild/\u003cplatform\u003e-\u003cpython-version\u003e/cmake-install \\\n  -DPYTHON_EXECUTABLE=\u003cpath-to-python\u003e \\\n  -DCMAKE_BUILD_TYPE=Release\n  ```\nThe build step is as follows using Ninja or MSVC/Make:\n```\ncmake --build _skbuild/\u003c...\u003e/cmake-build --config Release -- -v\n```\nThe install step is as follows (installing into _skbuild/\u003c...\u003e/cmake-install/ using paths in CMakeLists.txt)\n```\ncmake --install _skbuild/\u003c...\u003e/cmake-build --config Release\n```\nThe .pyd (Python equivalent of a DLL) and __init__.py (containing \"from .\u003cmodule\u003e import \u003cfunction\u003e\") are insalled as follows for Windows, for example:\n```\n%LOCALAPPDATA%\\Programs\\Python\\Python310\\Lib\\site-packages\\\n└── hellothere_package\\\n    ├── __init__.py\n    └── hellothere_module.cp310-win_amd64.pyd\n```\n\nThis will allow import hellothere_package to work along with calling hellothere_package.say_hello() (\u003cmodule\u003e.\u003cfunction\u003e)\n\nIn addition setuptools.build_meta looks at setup.py for information about the package (name, version, package and package_dir etc.).\n\nExample output:\n```\npip install git+https://github.com/gopalchand/hellothere_project.git\nLooking in indexes: ...\nCollecting git+https://github.com/gopalchand/hellothere_project.git\n  Cloning https://github.com/gopalchand/hellothere_project.git to %TEMP%\\pip-req-build-d3woeokv\n  Running command git clone --filter=blob:none --quiet https://github.com/gopalchand/hellothere_project.git '%TEMP%\\pip-req-build-d3woeokv'\n  Resolved https://github.com/gopalchand/hellothere_project.git to commit 507725bea2010196f879a3e057d4ea41af190ba1\n  Installing build dependencies ... done\n  Getting requirements to build wheel ... done\n  Preparing metadata (pyproject.toml) ... done\nBuilding wheels for collected packages: hellothere_package\n  Building wheel for hellothere_package (pyproject.toml) ... done\n  Created wheel for hellothere_package: filename=hellothere_package-0.1-cp310-cp310-win_amd64.whl size=53367 sha256=3fedabd8a4d89274503e7b02e7b101cf629f2db0464e973879caccce3f3c56e4\n  Stored in directory: %TEMP%\\pip-ephem-wheel-cache-jge77pdn\\wheels\\9a\\0c\\db\\b48906b275a2abdf1bf466b67ab79beabdc3758ba57ec41dc2\nSuccessfully built hellothere_package\nInstalling collected packages: hellothere_package\nSuccessfully installed hellothere_package-0.1\n```\n\n## 10. Check installation\n```\npip list|grep hellothere_package\nhellothere_package                0.1\n\n```\n\n## 11. Import and test\n```\nimport hellothere_package\nprint(hellothere_package.say_hello())\n```\n\n## 12. TL;DR\n```\npip install git+https://github.com/gopalchand/hellothere_package.git\n```\nand then run the following in python:\n```\nimport hellothere_package\nprint(hellothere_package.say_hello())\n```\nYou should see \"Hello from C++!\"\n\n## 13. Testing with Pytest\nclone the repo\n```\npip clone https://github.com/gopalchand/hellothere_package\n```\nMake sure pytest is installed\n```\npip install pytest\n```\nand then run pytest in the root folder for the cloned repo\n\n## 14. GitHub testing\nThe following test file is used for workflow based testing in GitHub:\n```\n.github/workflows/python-tests.yml\n```\n\nThanks to [ChatGPT](https://chat.openai.com) for guidance on setting up this CMake + pybind11 + scikit-build Python package.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopalchand%2Fhellothere_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgopalchand%2Fhellothere_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgopalchand%2Fhellothere_project/lists"}