Skip to content

Commit

Permalink
Merge pull request #13 from glmcdona/glmcdona/build_changes
Browse files Browse the repository at this point in the history
Update build PIP support for linux.
  • Loading branch information
glmcdona authored Jan 8, 2023
2 parents 53b294f + 3c0da79 commit 6f0f188
Show file tree
Hide file tree
Showing 256 changed files with 121 additions and 59,700 deletions.
13 changes: 13 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '{build}'
image: Visual Studio 2019
stack: python 3.7
skip_branch_with_pr: true
init:
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
install:
- ps: python -m pip install --disable-pip-version-check --upgrade --no-warn-script-location pip build virtualenv wheel
build_script:
- ps: |
python -m pip install .
test_script:
- ps: python tests\test.py
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
language: cpp
dist: trusty
matrix:
include:
- os: linux
env: PYTHON=3.8
- os: linux
env: CONDA=3.7
before_install:
- |
export CXX=g++-4.8 CC=gcc-4.8
if [ -n "$PYTHON" ]; then
python -m pip install --user virtualenv
virtualenv -p python${PYTHON:0:1} venv
source venv/bin/activate
elif [ -n "$CONDA" ]; then
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda${CONDA:0:1}-latest-Linux-x86_64.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda update -q conda
conda install -q conda-build
conda create -q -n test-environment python=$CONDA
source activate test-environment
fi
install:
- |
if [ -n "$PYTHON" ]; then
python -m pip install .
elif [ -n "$CONDA" ]; then
conda build conda.recipe --python $CONDA
conda install --use-local python_example
fi
script:
- python tests/test.py
10 changes: 0 additions & 10 deletions CMakeLists.txt

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ python setup.py install

Api:
```python
from binary2strings import binary2strings as b2s
import binary2strings as b2s

[(string, encoding, span, is_interesting),] =
b2s.extract_all_strings(buffer, min_chars=4, only_interesting=False)
Expand All @@ -48,7 +48,7 @@ Returns an array of tuples ordered according to the order in which they are loca

Example usage:
```python
from binary2strings import binary2strings as b2s
import binary2strings as b2s

data = b"hello world\x00\x00a\x00b\x00c\x00d\x00\x00"
result = b2s.extract_all_strings(data, min_chars=4)
Expand All @@ -61,7 +61,7 @@ print(result)

It also supports international languages, eg:
```python
from binary2strings import binary2strings as b2s
import binary2strings as b2s

# "hello world" in Chinese simplified
string = "\x00世界您好\x00"
Expand All @@ -76,7 +76,7 @@ print(result)

Example extracting all strings from a binary file:
```python
from binary2strings import binary2strings as b2s
import binary2strings as b2s

with open("C:\\Windows\\System32\\cmd.exe", "rb") as i:
data = i.read()
Expand All @@ -87,7 +87,7 @@ with open("C:\\Windows\\System32\\cmd.exe", "rb") as i:

Example extracting only interesting strings from a binary file:
```python
from binary2strings import binary2strings as b2s
import binary2strings as b2s

with open("C:\\Windows\\System32\\cmd.exe", "rb") as i:
data = i.read()
Expand Down
35 changes: 35 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package:
name: python_example
version: 0.0.1

source:
path: ..

build:
number: 0
script: {{ PYTHON }} -m pip install . -vvv

requirements:
build:
- {{ compiler('cxx') }}

host:
- python
- pip
- pybind11 >=2.10.0

run:
- python


test:
imports:
- python_example
source_files:
- tests
commands:
- python tests/test.py

about:
summary: Fast string extraction from binary buffers.
license_file: LICENSE
37 changes: 0 additions & 37 deletions lib/pybind11/.appveyor.yml

This file was deleted.

38 changes: 0 additions & 38 deletions lib/pybind11/.clang-format

This file was deleted.

72 changes: 0 additions & 72 deletions lib/pybind11/.clang-tidy

This file was deleted.

73 changes: 0 additions & 73 deletions lib/pybind11/.cmake-format.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions lib/pybind11/.github/CODEOWNERS

This file was deleted.

Loading

0 comments on commit 6f0f188

Please sign in to comment.