Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.

pycmake

python bindings for cmake.

how

1. write CMakeLists.py

from pycmake.cmake import *
from pycmake import utils
import os


cmake_cmake_minimum_required(CMAKE_VERSION, 3.6)
cmake_project("test")
cmake_add_executable("test")
cmake_target_sources("test", CMAKE_PRIVATE, "main.cpp")
cmake_target_link_libraries("test", "-framework Cocoa", "x")

cmake_add_subdirectory("test_subdir")
cmake_set("my_variable1", "test", CMAKE_CACHE, CMAKE_STRING, "This is my_variable")

cmake_target_sources(
    "test",
    CMAKE_PRIVATE,
    utils.find_files_in_dir_with_extensions(
        os.path.join(CMAKE_CURRENT_SOURCE_DIR, "src"),
        extensions="(h)|(cpp)",
        excluding_dirs="exclude_me",
    ),
)

cmake_if(CMAKE_NOT, "TEST_OPT")
cmake_include("test/CMakeLists.txt")
cmake_call("custom_fn", "p0", "p1")
cmake_endif()

2. python CMakeLists.py

run python CMakeLists.py to generate your CMakeLists.txt file.

Metadata

Release files for pycmake 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pycmake 0.1.1
File Interpreter ABI Platform
pycmake-0.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / pycmake-0.1.1-py2.py3-none-any.whl

Download URL pycmake-0.1.1-py2.py3-none-any.whl
Size 6.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e4c85fe784b97cd74899b924e19bf9fac4dec6a2b6485762d2b80da5b4d3a8b8
BLAKE2b-256 checksum
How to use checksums
52a69561303a1b497472126a5febd12f7b4c123598cb6f442cdc997766788dba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page