semvec/pypi-packages huggingface dataset:
braveblock 0.5.1
A fast and easy adblockplus parser and matcher based on adblock-rust package
License: MIT
Keywords: adblock,ads,adblocker,rust,brave,abp,pyo3

<p align="center">
    <a href="https://github.com/intsights/Braveblock">
        <img src="https://raw.githubusercontent.com/intsights/Braveblock/master/images/logo.png" alt="Logo">
    </a>
    <h3 align="center">
        A fast and easy adblockplus parser and matcher based on adblock-rust package
    </h3>
</p>


![license](https://img.shields.io/badge/MIT-License-blue)
![Python](https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)
![OS](https://img.shields.io/badge/OS-Mac%20%7C%20Linux%20%7C%20Windows-blue)
![Build](https://github.com/intsights/Braveblock/workflows/Build/badge.svg)
[![PyPi](https://img.shields.io/pypi/v/Braveblock.svg)](https://pypi.org/project/Braveblock/)

## Table of Contents

- [Table of Contents](#table-of-contents)
- [About The Project](#about-the-project)
  - [Built With](#built-with)
  - [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Contact](#contact)


## About The Project

This library is a Python binding to the [adblock-rust](https://github.com/brave/adblock-rust) library that was written by Brave's browser team. The binding uses [pyo3](https://github.com/PyO3/pyo3) to interact with the rust package.


### Built With

* [pyo3](https://github.com/PyO3/pyo3)
* [adblock-rust](https://github.com/brave/adblock-rust)


### Installation

```sh
pip3 install braveblock
```


## Usage

```python
import braveblock


# Initialize the engine loaded with a rules list
# One can download easylist and load its lines into the engine
braveblock.Adblocker(
    rules=[
        "-advertisement-icon.",
        "-advertisement/script.",
    ]
)

# This function checks whether the specified url should be blocked
adblocker.check_network_urls(
    url="http://example.com/-advertisement-icon.",
    source_url="http://example.com/helloworld",
    request_type="image",
)
```


## License

Distributed under the MIT License. See `LICENSE` for more information.


## Contact

Gal Ben David - gal@intsights.com

Project Link: [https://github.com/intsights/Braveblock](https://github.com/intsights/Braveblock)
pyo3-poker-eval 0.1.0
Poker eval library
License: MIT
Requires Python: >=3.10
Keywords: poker,rust

# Poker Eval

## Overview

Python [PyO3](https://pyo3.rs/) wrapper package over Rust crate [poker_eval](https://crates.io/crates/poker_eval).  
Cross compilation "linux2win" is done with [cross](https://github.com/cross-rs/cross).  

## Build

Commands:

```sh
# prerequisite
mm activate work
pip install -U build

# dev install
pip install -e .

# watch 
cargo watch --watch rust -- pip install -e .

# test
pytest

# install
pip install .

# ------- build native wheel
unset CARGO
unset CARGO_BUILD_TARGET
unset PYO3_CROSS_LIB_DIR
unset PYO3_CROSS_PYTHON_VERSION
unset DIST_EXTRA_CONFIG

python -m build


# ------- build manylinux wheel
# image used by build
docker build -t builder-manylinux:local -f ./Dockerfile.manylinux .

# build wheels for several python versions
docker run --rm -v $(pwd):/io builder-manylinux:local /bin/bash /io/build-manylinux-wheels.sh


# ------- build windows wheel - using cross
# prerequisite
cargo install cross

export CARGO=cross
export CARGO_BUILD_TARGET=x86_64-pc-windows-gnu
export DIST_EXTRA_CONFIG=/tmp/build-opts.cfg

# set wheel suffix
echo -e "[bdist_wheel]\nplat_name=win-amd64" > $DIST_EXTRA_CONFIG

# image used by cross
docker build -t cross-pyo3:x86_64-pc-windows-gnu -f ./Dockerfile.win .

# build windows wheel
python -m build
```

This produced wheels for linux and windows:

```sh
ls -1  dist
pyo3_poker_eval-0.1.0-cp310-cp310-linux_x86_64.whl
pyo3_poker_eval-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyo3_poker_eval-0.1.0-cp310-cp310-pc_windows_gnu_x86_64.whl
pyo3_poker_eval-0.1.0-cp311-cp311-linux_x86_64.whl
pyo3_poker_eval-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyo3_poker_eval-0.1.0.tar.gz
```

## Publish

Commands:

```sh
# prerequisite
mm activate work
pip install -U twine auditwheel

twine check dist/*

# assuming .pypirc configured
# for linux only manylinux: the others will be refused
twine upload dist/*manylinux*
twine upload dist/*windows*
twine upload dist/*.tar.gz
```

## Install

Commands:

```sh
############ TBD - no ready yet
pip install pyo3_poker_eval
```

## Ref

Python packaging offical recommendation: [Is setup.py deprecated?](https://packaging.python.org/en/latest/discussions/setup-py-deprecated/).