Python undefined header in pyconfig.h
Project description
Python_undef
This is a Python script that generates a header file "Python_undef.h" which undefine many macros in "pyconfig.h" that doesn't match the rule that "should start with PY_".
Why
The "pyconfig.h" continue many macros that doesn't math the rule that "should start with PY_" which may cause the comflict with the other projects. This project undefines them.
Download
pip install python_undef
Usage
This command will create the file "Python_undef.h"
python -m python_undef --generate
This command will output the include path of "Python_undef.h".
You can use this command in your C/C++ project such as "cmake", "gyp" and so on.
python -m python_undef --include
You can include the "Python_undef.h" file in your project:
#include <Python.h>
#include <Python_undef.h>
#include <other_header.h>
The "pyconfig.h" continue many macros that doesn't math the rule that "should start with PY_". This file undefine them.
If you want to save the macro, use #define DONOTUNDEF_macro_name before include "Python_undef.h" to keep it.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_undef-0.1.3.tar.gz.
File metadata
- Download URL: python_undef-0.1.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2bedc5ccab5474b7d3ab05c89ee3cdd05d0645fa5015d59ef3b07f58d1040d9
|
|
| MD5 |
c6dc593d002a4350b92430abc26d3405
|
|
| BLAKE2b-256 |
3945521dcea86f00330525465a86f097d1511028cdc9b9cb34c63f7a49ddf189
|
File details
Details for the file python_undef-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: python_undef-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb7d5aa7a7ed430e9b62728df23efe5d9858afb1953b96bf0b8c23626e4d8de
|
|
| MD5 |
46dba89f707a907c316ba474c70a9782
|
|
| BLAKE2b-256 |
4f781b482fce26c7412ac78c530bde552a56c4b4c5d8db8378d1fe40e21bd7ff
|