Metadata-Version: 2.1
Name: cythonbuilder
Version: 0.1.22
Summary: CythonBuilder; automated compiling and packaging of Cython code
License: MIT
Keywords: pypi,Cython,setup,packaging,compilation
Author: Mike Huls
Author-email: m.huls@datanext.nl
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: cython (>=0.29.28,<0.30.0)
Requires-Dist: typer (>=0.7.0,<0.8.0)
Project-URL: Bug Tracker, https://github.com/mike-huls/cythonbuilder/issues
Project-URL: Documentation, https://github.com/mike-huls/cythonbuilder/blob/main/README.md/
Project-URL: Homepage, https://github.com/mike-huls/cythonbuilder
Project-URL: Source, https://github.com/mike-huls/cythonbuilder/
Project-URL: Say Thanks!, https://www.buymeacoffee.com/mikehuls
Description-Content-Type: text/markdown

# CythonBuilder: automated compiling and packaging of Cython code

|         |                                                                                                                                                                                                                                                                                                                                                                                                               |
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Testing | ![coverage](https://img.shields.io/codecov/c/github/mike-huls/cythonbuilder)                                                                                                                                                                                                                                                                                                                                  |
| Package | [![PyPI Latest Release](https://img.shields.io/pypi/v/cythonbuilder.svg)](https://pypi.org/project/cythonbuilder/) [![PyPI Downloads](https://img.shields.io/pypi/dm/cythonbuilder.svg?label=PyPI%20downloads)](https://pypistats.org/packages/cythonbuilder) <br/>![status](https://img.shields.io/pypi/status/cythonbuilder) ![dependencies](https://img.shields.io/librariesio/release/pypi/cythonbuilder) |
| Meta    | ![GitHub License](https://img.shields.io/github/license/mike-huls/cythonbuilder) ![implementation](https://img.shields.io/pypi/implementation/cythonbuilder)  ![versions](https://img.shields.io/pypi/pyversions/cythonbuilder)                                                                                                                                                                               |
| Social  | ![tweet](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fmike-huls%2Fcythonbuilder) ![xfollow](https://img.shields.io/twitter/follow/mike_huls?style=social)                                                                                                                                                                                                                   | 


CythonBuilder makes it easy to use Cython in your Python project by automating the building process.
You can use CythonBuilder from the commandline or import it as a package in Python. 
Generated files can be imported in Python directly

```sh
pip install cythonbuilder
```


### Normal
Add `-v` (verbose) for more information 
1. Listing files with and without filter
```commandline
cybuilder list
cybuilder list --files file1 file2.pyx
```

2. Build with and without optional build arguments 
```commandline
cybuilder build
cybuilder build --include-numpy --no-annotation --no-cleanup
```

3. Clean
```commandline
cybuilder clean 
cybuilder clean --no-cleanup
```

<hr>

### With Python
1. Listing files with and without filter

```python

from cythonbuilderr import cythonbuilder as cybuilder

print(cybuilder.cy_list())  # without a filter
print(cybuilder.cy_list(target_files=['some_name.pyx']))  # with a filter
```

2. Build with and without optional build arguments  (cleans automatically afterwards)

```python

from src import cythonbuilder as cybuilder

cybuilder.cy_build()

found_files = cybuilder.cy_build(target_files=['some_name'])
cybuilder.cy_build(target_files=found_files, include_numpy=False, create_annotations=False)
```

3. Clean

```python

from src import cythonbuilder as cybuilder

cybuilder.cy_clean()

found_files = cybuilder.cy_build(target_files=['some_name'])
cybuilder.cy_clean(target_files=['some_name'])
```

4. Setting debug level for verbose logging

```python
from cythonbuilderr import logger
from cythonbuilderr import set_logger_debug_mode

set_logger_debug_mode(logger=logger)
```

### In-depth, step by step Explanation
I've written a few articles that explain why Python is slow, why Cython can be a solution and how CythonBuilder helps us develop fast code easily:
- [Why Python is so slow and how to speed it up](https://mikehuls.medium.com/why-is-python-so-slow-and-how-to-speed-it-up-485b5a84154e)
- [Getting started with Cython; how to perform >1.7 billion calculations per second with Python](https://mikehuls.medium.com/getting-started-with-cython-how-to-perform-1-7-billion-calculations-per-second-in-python-b83374cfcf77)
- [Cython for data science: 6 steps to make this Pandas dataframe operation over 100x faster](https://mikehuls.medium.com/cython-for-data-science-6-steps-to-make-this-pandas-dataframe-operation-over-100x-faster-1dadd905a00b)

