Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- libicu-test
pull_request:
schedule:
# run CI every day even if no PRs/merges occur
Expand Down Expand Up @@ -91,10 +90,11 @@ jobs:
matrix:
platform: ["ubuntu-latest", "macos-latest"]
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
build-arch: ["x64", "Win32"]
build-type: ["Debug", "Release"]
build-shared: ["0", "1"]
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -149,7 +149,7 @@ jobs:
mkdir build
cd build
cmake `
-G "Visual Studio 16 2019" `
-G "Visual Studio 17 2022" `
-A ${{ matrix.build-arch }} `
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }} `
-DPEPARSE_ENABLE_TESTING=ON `
Expand All @@ -173,10 +173,11 @@ jobs:
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
python-version: "3.x"

- name: sdist
run: python3 setup.py sdist
run: |
python -m pip install build
python -m build --sdist

- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ cmake --build . --target install

### Windows-specific

VS 2017 and VS 2019 are supported.
VS 2017, VS 2019, and VS 2022 are supported.

```
# Compile 64-bit binaries with Visual Studio 2017
Expand All @@ -97,6 +97,9 @@ cmake -G "Visual Studio 15 2017 Win64" ..
# Or, with VS 2019, use the -A flag for architecture
cmake -G "Visual Studio 16 2019" -A Win64 ..

# Or, with VS 2022
cmake -G "Visual Studio 17 2022" -A Win64 ..

# Pass the build type at build time
cmake --build . --config Release
```
Expand Down
6 changes: 3 additions & 3 deletions pepy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pepy (pronounced p-pie) is a python binding to the pe-parse parser.

pepy supports Python versions 3.6 and above.
pepy supports Python versions 3.10 and above.

The easiest way to use pepy is to install it via pip:

Expand All @@ -16,9 +16,9 @@ If you can build pe-parse and have a working python environment (headers and
libraries) you can build pepy.

1. Build pepy:
* `python3 setup.py build`
* `pip install build && python3 -m build`
2. Install pepy:
* `python3 setup.py install`
* `pip install .`

**Building on Windows:** Python 3.x is typically installed as _python.exe_,
**NOT** _python3.exe_.
Expand Down
38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "pepy"
dynamic = ["version", "readme"]
description = "Python bindings for pe-parse"
authors = [
{name = "Wesley Shields", email = "[email protected]"}
]
license = "BSD-2-Clause"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: C++",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[project.urls]
Homepage = "https://github.com/trailofbits/pe-parse"
Repository = "https://github.com/trailofbits/pe-parse"

[tool.setuptools]
# pepy is a C extension module, not a Python package
# No Python packages to discover - only the compiled extension from setup.py
packages = []

[tool.setuptools.dynamic]
version = {file = "VERSION"}
readme = {file = "pepy/README.md", content-type = "text/markdown"}
19 changes: 2 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
here = os.path.dirname(__file__)
pepy = os.path.join(here, "pepy")


with open(os.path.join(pepy, "README.md")) as f:
README = f.read()

with open(os.path.join(here, "VERSION")) as f:
VERSION = f.read().strip()

Expand Down Expand Up @@ -95,16 +91,5 @@
libraries=LIBRARIES,
)

setup(
name="pepy",
url="https://github.com/trailofbits/pe-parse",
python_requires=">=3.8",
version=VERSION,
description="Python bindings for pe-parse",
long_description=README,
long_description_content_type="text/markdown",
author="Wesley Shields",
author_email="[email protected]",
license="BSD",
ext_modules=[extension_mod],
)
# All metadata now comes from pyproject.toml
setup(ext_modules=[extension_mod])
Loading