Skip to content

New Build System#35

Open
ryanketzner wants to merge 6 commits intomainfrom
package-dev
Open

New Build System#35
ryanketzner wants to merge 6 commits intomainfrom
package-dev

Conversation

@ryanketzner
Copy link
Copy Markdown
Collaborator

Added new build system so that entire library, included kcl, can be installed with a single pip install. Dependencies are managed using a conda environment which is specified in an environment.yml for easy setup.

New:

  1. CMakeLists.txt: Setup to build GTE. This file is calleed by the python build system (scikit-build).
  2. environment.yml: Dependencies for automatic conda environment creation.
  3. extern/CoverageKinematics: Updated submodule reference for kcl to include commits related to new build system.

Modified:

  1. pyproject.toml: Added missing dependencies. Setup two build versions, default and dev. Setup scikit-build for C++ code.
  2. README.md: Updated docs to reflect new installation process.

New:

	CMakeLists.txt: Setup to build GTE. This file is calleed by the python build system (scikit-build).

	environment.yml: Dependencies for automatic conda environment creation.

	extern/CoverageKinematics: Updated submodule reference for automated kcl build.

Modified:

	pyproject.toml: Added missing dependencies. Updated to use scikit-build for building gte.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new build/packaging flow to support building and installing the project (including its C++ components) via pip install, with a companion conda environment file to provision native dependencies.

Changes:

  • Switched Python build backend to scikit-build-core and updated project/development dependencies in pyproject.toml.
  • Added environment.yml to create a conda environment with native dependencies.
  • Added a top-level CMakeLists.txt and updated README.md installation instructions for the new workflow.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

File Description
pyproject.toml Moves to scikit-build-core and updates packaging metadata/dependencies.
environment.yml Defines the conda environment intended to support local builds/installs.
README.md Documents the new conda + pip installation flow.
CMakeLists.txt Adds CMake entry point to build/install the C++ targets used by Python.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread environment.yml
- python=3.13
- eigen
- fmt
- tbb
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment file sets up runtime deps but does not include common build tooling needed for a CMake/pybind11 build (e.g., cmake, ninja, and a C++ compiler toolchain packages such as cxx-compiler on conda-forge). With the current README instructions (conda env create then pip install .), builds can fail on clean machines. Consider adding the build tools here to make the one-command setup work reliably.

Suggested change
- tbb
- tbb
- cmake
- ninja
- cxx-compiler

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +13 to 24
Create a conda environment from the provided environment file.

```
conda env create -f environment.yml
conda activate orbitpy
```

Then, install the package into the environment using pip.

Create a conda environment and install the dependencies:
```
conda create -n eosim-revised python=3.13
conda activate eosim-revised
conda install sphinx
pip install sphinx-rtd-theme
pip install pylint
pip install black
pip install coverage
pip install skyfield
pip install astropy
pip install .
```
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The install instructions don’t mention initializing the extern/CoverageKinematics git submodule. Since the build calls add_subdirectory(extern/CoverageKinematics), pip install . from a fresh clone without submodules will fail. Add a note to clone with --recurse-submodules or run git submodule update --init --recursive before the pip install step.

Copilot uses AI. Check for mistakes.
Comment thread CMakeLists.txt
Comment on lines +6 to +7
install(TARGETS GeometricTools LIBRARY DESTINATION .)
install(TARGETS kcl LIBRARY DESTINATION .) No newline at end of file
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The install(TARGETS ...) commands only specify LIBRARY DESTINATION. On Windows, Python extension modules (.pyd) are installed via the RUNTIME destination, so they may not be included in the install/wheel. Add RUNTIME DESTINATION (and consider ARCHIVE DESTINATION if needed) to ensure the targets are installed on all platforms.

Suggested change
install(TARGETS GeometricTools LIBRARY DESTINATION .)
install(TARGETS kcl LIBRARY DESTINATION .)
install(TARGETS GeometricTools
LIBRARY DESTINATION .
RUNTIME DESTINATION .
ARCHIVE DESTINATION .
)
install(TARGETS kcl
LIBRARY DESTINATION .
RUNTIME DESTINATION .
ARCHIVE DESTINATION .
)

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
]

[tool.scikit-build]
wheel.packages = ["src/orbitpy"]
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[tool.scikit-build] wheel.packages points to src/orbitpy, but this repository uses a top-level orbitpy/ package directory (there is no src/ directory). This will cause the wheel to omit the orbitpy package. Update the packages setting to match the actual package location (e.g., orbitpy).

Suggested change
wheel.packages = ["src/orbitpy"]
wheel.packages = ["orbitpy"]

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
include = ["orbitpy"]
requires = [
"scikit-build-core>=0.10",
"pybind11>=2.12"
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build backend is CMake-based (scikit-build-core) and the top-level CMakeLists.txt requires CMake >= 3.20, but cmake (and typically ninja) are not listed in [build-system].requires. On a machine without system CMake/Ninja, pip install . will fail while building the wheel. Add explicit build requirements (or otherwise ensure they are provided) so pip builds are reproducible.

Suggested change
"pybind11>=2.12"
"pybind11>=2.12",
"cmake>=3.20",
"ninja"

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
version = "0.1.0"
description = "A Python package for computing satellite remote-sensing orbit data."
readme = "README.md"
license = "MIT"
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license = "MIT" is not PEP 621-compliant for the [project] table (the license field is a table, typically license = { text = "MIT" } or license = { file = "LICENSE" }). Some build backends/metadata parsers will reject this and fail the build.

Suggested change
license = "MIT"
license = { text = "MIT" }

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants