Metadata-Version: 2.1
Name: bochscpu-python
Version: 0.1.2
Summary: Python bindings for BochsCPU.
Author-Email: hugsy <hugsy@blah.cat>
License: MIT License
        
        Copyright (c) 2023 crazy hugsy
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Emulators
Classifier: Natural Language :: English
Project-URL: Homepage, https://github.com/hugsy/bochscpu-python
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# bochscpu-python

Python bindings for [@yrp](https://github.com/yrp604/)'s [BochsCPU](https://github.com/yrp604/bochscpu) using [FFI](https://github.com/yrp604/bochscpu-ffi)

![image](https://i.imgur.com/YvXg2Tz.png)

## Build

 * Build BochsCPU, BochsCPU-FFI, and BochsCPU-Build following the instructions on their pages
 * Move the `*.lib` in `bochscpu/lib/<BuildType>` (where `BuildType` can be `Debug`, `Release`, `RelWithDebInfo`, etc.)
 * Install the requirements: `python -m pip install -r requirements.txt`
 * Build with `cmake`
   This will generate the bochscpu `pyd` file (and its PDB) which you can import from a Python session with `import bochscpu`.
 * You can also generate a `.whl`:

```
mkdir wheel
python -m pip wheel . -w .\wheel\
```

## Install

### From the source repository

```
python -m pip install .
```

Or without cloning

```
python -m pip install git+https://github.com/hugsy/bochscpu-python.git#egg=bochscpu
```


### Via PyPI

```
python -m pip install bochscpu
```


### Via the generated builds

Download the latest working artifact from [the repository Github Actions tab]. Extract the ZIP file, install the `.whl` file you'll find inside the `wheel` folder.

```
python -m pip install wheel/bochscpu-$version-$os-$arch.whl
```


## Usage

Just import the `bochscpu` module
