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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycmake-0.1.1-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pycmake-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pycmake-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for pycmake-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e4c85fe784b97cd74899b924e19bf9fac4dec6a2b6485762d2b80da5b4d3a8b8
MD5 2f9acfadba303e242dc6f753eb3fa903
BLAKE2b-256 52a69561303a1b497472126a5febd12f7b4c123598cb6f442cdc997766788dba

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 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