ida-domain 0.0.1.dev22__tar.gz → 0.0.3.dev0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ida-domain might be problematic. Click here for more details.
- ida_domain-0.0.3.dev0/.github/workflows/create-release.yml +416 -0
- ida_domain-0.0.3.dev0/.github/workflows/publish-docs.yml +81 -0
- ida_domain-0.0.3.dev0/.gitignore +140 -0
- ida_domain-0.0.3.dev0/LICENSE.TXT +21 -0
- ida_domain-0.0.3.dev0/PKG-INFO +158 -0
- ida_domain-0.0.3.dev0/README.md +134 -0
- ida_domain-0.0.3.dev0/docs/Makefile +20 -0
- ida_domain-0.0.3.dev0/docs/README.md +201 -0
- ida_domain-0.0.3.dev0/docs/_static/custom.css +67 -0
- ida_domain-0.0.3.dev0/docs/_templates/autosummary/class.rst +30 -0
- ida_domain-0.0.3.dev0/docs/_templates/autosummary/module.rst +60 -0
- ida_domain-0.0.3.dev0/docs/api.rst +122 -0
- ida_domain-0.0.3.dev0/docs/conf.py +146 -0
- ida_domain-0.0.3.dev0/docs/examples.rst +280 -0
- ida_domain-0.0.3.dev0/docs/index.rst +94 -0
- ida_domain-0.0.3.dev0/docs/installation.rst +279 -0
- ida_domain-0.0.3.dev0/docs/themes/hex-rays-theme/css/style.css +70 -0
- ida_domain-0.0.3.dev0/docs/themes/hex-rays-theme/images/ida_domain.png +0 -0
- ida_domain-0.0.3.dev0/docs/themes/hex-rays-theme/images/ida_domain.svg +3 -0
- ida_domain-0.0.3.dev0/examples/traverse.py +52 -0
- ida_domain-0.0.3.dev0/ida_domain/__init__.py +25 -0
- ida_domain-0.0.3.dev0/ida_domain/basic_blocks.py +156 -0
- ida_domain-0.0.3.dev0/ida_domain/bytes.py +252 -0
- ida_domain-0.0.3.dev0/ida_domain/comments.py +160 -0
- ida_domain-0.0.3.dev0/ida_domain/database.py +275 -0
- ida_domain-0.0.3.dev0/ida_domain/functions.py +354 -0
- ida_domain-0.0.3.dev0/ida_domain/ida_command_builder.py +239 -0
- ida_domain-0.0.3.dev0/ida_domain/instructions.py +169 -0
- ida_domain-0.0.3.dev0/ida_domain/names.py +125 -0
- ida_domain-0.0.3.dev0/ida_domain/segments.py +127 -0
- ida_domain-0.0.3.dev0/ida_domain/signature_files.py +49 -0
- ida_domain-0.0.3.dev0/ida_domain/strings.py +124 -0
- ida_domain-0.0.3.dev0/ida_domain/types.py +107 -0
- ida_domain-0.0.3.dev0/ida_domain/version.py +35 -0
- ida_domain-0.0.3.dev0/ida_domain/xrefs.py +132 -0
- ida_domain-0.0.3.dev0/ida_domain.egg-info/PKG-INFO +158 -0
- ida_domain-0.0.3.dev0/ida_domain.egg-info/SOURCES.txt +47 -0
- ida_domain-0.0.3.dev0/ida_domain.egg-info/requires.txt +9 -0
- ida_domain-0.0.3.dev0/pyproject.toml +43 -0
- ida_domain-0.0.3.dev0/tests/ida_domain_test.py +631 -0
- ida_domain-0.0.3.dev0/tests/pytest.ini +3 -0
- ida_domain-0.0.3.dev0/tests/resources/example.til +0 -0
- ida_domain-0.0.3.dev0/tests/tools/README.md +33 -0
- ida_domain-0.0.3.dev0/tests/tools/dumpbin.py +30 -0
- ida_domain-0.0.3.dev0/tests/tools/tiny.asm +132 -0
- ida_domain-0.0.3.dev0/uv.lock +448 -0
- ida_domain-0.0.1.dev22/PKG-INFO +0 -108
- ida_domain-0.0.1.dev22/ida_domain/__init__.py +0 -56
- ida_domain-0.0.1.dev22/ida_domain/linux/__init__.py +0 -18
- ida_domain-0.0.1.dev22/ida_domain/linux/_ida_domain.so +0 -0
- ida_domain-0.0.1.dev22/ida_domain/linux/ida_domain.py +0 -67152
- ida_domain-0.0.1.dev22/ida_domain/linux/ida_domain.pyi +0 -6187
- ida_domain-0.0.1.dev22/ida_domain/linux/libida_domain.so +0 -0
- ida_domain-0.0.1.dev22/ida_domain/macos/__init__.py +0 -23
- ida_domain-0.0.1.dev22/ida_domain/macos/_ida_domain.so +0 -0
- ida_domain-0.0.1.dev22/ida_domain/macos/ida_domain.py +0 -67152
- ida_domain-0.0.1.dev22/ida_domain/macos/ida_domain.pyi +0 -6187
- ida_domain-0.0.1.dev22/ida_domain/macos/libida_domain.dylib +0 -0
- ida_domain-0.0.1.dev22/ida_domain/windows/__init__.py +0 -18
- ida_domain-0.0.1.dev22/ida_domain/windows/_ida_domain.pyd +0 -0
- ida_domain-0.0.1.dev22/ida_domain/windows/ida_domain.dll +0 -0
- ida_domain-0.0.1.dev22/ida_domain/windows/ida_domain.py +0 -67152
- ida_domain-0.0.1.dev22/ida_domain/windows/ida_domain.pyi +0 -6187
- ida_domain-0.0.1.dev22/ida_domain/windows/python3.dll +0 -0
- ida_domain-0.0.1.dev22/ida_domain.egg-info/PKG-INFO +0 -108
- ida_domain-0.0.1.dev22/ida_domain.egg-info/SOURCES.txt +0 -24
- ida_domain-0.0.1.dev22/ida_domain.egg-info/not-zip-safe +0 -1
- ida_domain-0.0.1.dev22/ida_domain.egg-info/requires.txt +0 -1
- ida_domain-0.0.1.dev22/setup.py +0 -122
- {ida_domain-0.0.1.dev22 → ida_domain-0.0.3.dev0}/ida_domain.egg-info/dependency_links.txt +0 -0
- {ida_domain-0.0.1.dev22 → ida_domain-0.0.3.dev0}/ida_domain.egg-info/top_level.txt +0 -0
- {ida_domain-0.0.1.dev22 → ida_domain-0.0.3.dev0}/setup.cfg +0 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
name: Create Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
revision:
|
|
7
|
+
description: 'Git revision (commit SHA, branch, or tag) to checkout'
|
|
8
|
+
required: false
|
|
9
|
+
default: ''
|
|
10
|
+
type: string
|
|
11
|
+
publish_to_pypi:
|
|
12
|
+
description: 'Publish to PyPI?'
|
|
13
|
+
required: false
|
|
14
|
+
default: 'false'
|
|
15
|
+
type: choice
|
|
16
|
+
options:
|
|
17
|
+
- 'true'
|
|
18
|
+
- 'false'
|
|
19
|
+
create_prerelease:
|
|
20
|
+
description: 'Create a pre-release tag?'
|
|
21
|
+
required: false
|
|
22
|
+
default: 'false'
|
|
23
|
+
type: choice
|
|
24
|
+
options:
|
|
25
|
+
- 'true'
|
|
26
|
+
- 'false'
|
|
27
|
+
prerelease_type:
|
|
28
|
+
description: 'Pre-release type (if creating pre-release)'
|
|
29
|
+
required: false
|
|
30
|
+
default: 'dev'
|
|
31
|
+
type: choice
|
|
32
|
+
options:
|
|
33
|
+
- 'dev'
|
|
34
|
+
- 'alpha'
|
|
35
|
+
- 'beta'
|
|
36
|
+
- 'rc'
|
|
37
|
+
|
|
38
|
+
jobs:
|
|
39
|
+
prepare-version:
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
permissions:
|
|
42
|
+
contents: write
|
|
43
|
+
outputs:
|
|
44
|
+
version: ${{ steps.version.outputs.version }}
|
|
45
|
+
pypi_version: ${{ steps.version.outputs.pypi_version }}
|
|
46
|
+
git_hash: ${{ steps.version.outputs.git_hash }}
|
|
47
|
+
tag_name: ${{ steps.version.outputs.tag_name }}
|
|
48
|
+
is_prerelease: ${{ steps.version.outputs.is_prerelease }}
|
|
49
|
+
dev_status: ${{ steps.version.outputs.dev_status }}
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- name: Checkout repository
|
|
53
|
+
uses: actions/checkout@v4
|
|
54
|
+
with:
|
|
55
|
+
submodules: false
|
|
56
|
+
fetch-depth: 0
|
|
57
|
+
ref: ${{ github.event.inputs.revision || github.sha }}
|
|
58
|
+
|
|
59
|
+
- name: Install uv
|
|
60
|
+
uses: astral-sh/setup-uv@v4
|
|
61
|
+
with:
|
|
62
|
+
enable-cache: false
|
|
63
|
+
|
|
64
|
+
- name: Set up Python
|
|
65
|
+
run: uv python install 3.11
|
|
66
|
+
|
|
67
|
+
- name: Install setuptools-scm
|
|
68
|
+
run: |
|
|
69
|
+
# Sync the project to ensure setuptools-scm is available
|
|
70
|
+
uv sync --extra dev
|
|
71
|
+
|
|
72
|
+
- name: Get version from setuptools-scm
|
|
73
|
+
id: version
|
|
74
|
+
run: |
|
|
75
|
+
# Get the short commit hash
|
|
76
|
+
GIT_COMMIT_SHORT_HASH=$(git rev-parse --short=7 HEAD)
|
|
77
|
+
echo "Git commit short hash: $GIT_COMMIT_SHORT_HASH"
|
|
78
|
+
|
|
79
|
+
# Get version using setuptools-scm (this handles all the dev versioning automatically)
|
|
80
|
+
SCM_VERSION=$(uv run python -c "from setuptools_scm import get_version; print(get_version())")
|
|
81
|
+
echo "setuptools-scm version: $SCM_VERSION"
|
|
82
|
+
|
|
83
|
+
# Extract the clean version without local identifiers for PyPI
|
|
84
|
+
PYPI_VERSION=$(echo "$SCM_VERSION" | sed 's/+.*//')
|
|
85
|
+
echo "PyPI version: $PYPI_VERSION"
|
|
86
|
+
|
|
87
|
+
# Handle manual pre-release creation
|
|
88
|
+
if [[ "${{ github.event.inputs.create_prerelease }}" == "true" ]]; then
|
|
89
|
+
echo "Creating manual pre-release..."
|
|
90
|
+
|
|
91
|
+
# Get base version from current setuptools-scm version
|
|
92
|
+
BASE_VERSION=$(echo "$PYPI_VERSION" | sed 's/\.dev[0-9]*$//')
|
|
93
|
+
PRE_TYPE="${{ github.event.inputs.prerelease_type }}"
|
|
94
|
+
|
|
95
|
+
# Find the latest pre-release tag for this version and type
|
|
96
|
+
git fetch --tags
|
|
97
|
+
TAG_PATTERN="v${BASE_VERSION}${PRE_TYPE}[0-9]*"
|
|
98
|
+
LATEST_PRE_TAG=$(git tag -l "$TAG_PATTERN" | sort -V | tail -n 1)
|
|
99
|
+
|
|
100
|
+
if [[ -n "$LATEST_PRE_TAG" ]]; then
|
|
101
|
+
# Extract the number from the tag and increment
|
|
102
|
+
if [[ "$LATEST_PRE_TAG" =~ ${PRE_TYPE}([0-9]+) ]]; then
|
|
103
|
+
PREV_NUMBER="${BASH_REMATCH[1]}"
|
|
104
|
+
PRE_NUMBER=$((PREV_NUMBER + 1))
|
|
105
|
+
echo "Found previous pre-release number: $PREV_NUMBER, incrementing to: $PRE_NUMBER"
|
|
106
|
+
else
|
|
107
|
+
PRE_NUMBER="1"
|
|
108
|
+
echo "Could not parse pre-release number, using: 1"
|
|
109
|
+
fi
|
|
110
|
+
else
|
|
111
|
+
PRE_NUMBER="1"
|
|
112
|
+
echo "No previous pre-release tags found, starting with: 1"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# Create PEP 440 compliant pre-release version
|
|
116
|
+
if [[ "$PRE_TYPE" == "dev" ]]; then
|
|
117
|
+
PYPI_VERSION="${BASE_VERSION}.dev${PRE_NUMBER}"
|
|
118
|
+
TAG_NAME="v${BASE_VERSION}.dev${PRE_NUMBER}"
|
|
119
|
+
elif [[ "$PRE_TYPE" == "alpha" ]]; then
|
|
120
|
+
PYPI_VERSION="${BASE_VERSION}a${PRE_NUMBER}"
|
|
121
|
+
TAG_NAME="v${BASE_VERSION}${PRE_TYPE}${PRE_NUMBER}"
|
|
122
|
+
elif [[ "$PRE_TYPE" == "beta" ]]; then
|
|
123
|
+
PYPI_VERSION="${BASE_VERSION}b${PRE_NUMBER}"
|
|
124
|
+
TAG_NAME="v${BASE_VERSION}${PRE_TYPE}${PRE_NUMBER}"
|
|
125
|
+
elif [[ "$PRE_TYPE" == "rc" ]]; then
|
|
126
|
+
PYPI_VERSION="${BASE_VERSION}rc${PRE_NUMBER}"
|
|
127
|
+
TAG_NAME="v${BASE_VERSION}${PRE_TYPE}${PRE_NUMBER}"
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
IS_PRERELEASE="true"
|
|
131
|
+
|
|
132
|
+
echo "Manual pre-release version: $PYPI_VERSION"
|
|
133
|
+
echo "Manual pre-release tag: $TAG_NAME"
|
|
134
|
+
else
|
|
135
|
+
# Use setuptools-scm automatic versioning
|
|
136
|
+
|
|
137
|
+
# Check if this is a pre-release (contains dev, alpha, beta, rc)
|
|
138
|
+
if [[ "$PYPI_VERSION" =~ (dev|a|b|rc) ]]; then
|
|
139
|
+
IS_PRERELEASE="true"
|
|
140
|
+
echo "Detected automatic pre-release version"
|
|
141
|
+
else
|
|
142
|
+
IS_PRERELEASE="false"
|
|
143
|
+
echo "Detected stable release version"
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
# For manual tag creation, use the provided tag name or create one from version
|
|
147
|
+
if [[ -n "${{ github.event.inputs.revision }}" && "${{ github.event.inputs.revision }}" =~ ^v[0-9] ]]; then
|
|
148
|
+
# User provided a tag name
|
|
149
|
+
TAG_NAME="${{ github.event.inputs.revision }}"
|
|
150
|
+
echo "Using provided tag name: $TAG_NAME"
|
|
151
|
+
else
|
|
152
|
+
# Create tag name from version (for dev releases, don't create tags automatically)
|
|
153
|
+
if [[ "$IS_PRERELEASE" == "true" ]]; then
|
|
154
|
+
TAG_NAME="" # Don't auto-create tags for dev versions
|
|
155
|
+
echo "Dev version detected - no automatic tag creation"
|
|
156
|
+
else
|
|
157
|
+
TAG_NAME="v${PYPI_VERSION}"
|
|
158
|
+
echo "Will create tag: $TAG_NAME"
|
|
159
|
+
fi
|
|
160
|
+
fi
|
|
161
|
+
fi
|
|
162
|
+
|
|
163
|
+
# Determine development status based on version
|
|
164
|
+
if [[ "$PYPI_VERSION" =~ dev ]]; then
|
|
165
|
+
DEV_STATUS="Development Status :: 2 - Pre-Alpha"
|
|
166
|
+
elif [[ "$PYPI_VERSION" =~ a ]]; then
|
|
167
|
+
DEV_STATUS="Development Status :: 3 - Alpha"
|
|
168
|
+
elif [[ "$PYPI_VERSION" =~ (b|rc) ]]; then
|
|
169
|
+
DEV_STATUS="Development Status :: 4 - Beta"
|
|
170
|
+
else
|
|
171
|
+
DEV_STATUS="Development Status :: 5 - Production/Stable"
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
echo "Final version: $PYPI_VERSION"
|
|
175
|
+
echo "Final tag: $TAG_NAME"
|
|
176
|
+
echo "Is pre-release: $IS_PRERELEASE"
|
|
177
|
+
echo "Dev status: $DEV_STATUS"
|
|
178
|
+
|
|
179
|
+
echo "version=$SCM_VERSION" >> $GITHUB_OUTPUT
|
|
180
|
+
echo "pypi_version=$PYPI_VERSION" >> $GITHUB_OUTPUT
|
|
181
|
+
echo "git_hash=$GIT_COMMIT_SHORT_HASH" >> $GITHUB_OUTPUT
|
|
182
|
+
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
|
|
183
|
+
echo "is_prerelease=$IS_PRERELEASE" >> $GITHUB_OUTPUT
|
|
184
|
+
echo "dev_status=$DEV_STATUS" >> $GITHUB_OUTPUT
|
|
185
|
+
|
|
186
|
+
- name: Create and push Git tag
|
|
187
|
+
if: steps.version.outputs.tag_name != ''
|
|
188
|
+
run: |
|
|
189
|
+
git config --global user.name "GitHub Actions"
|
|
190
|
+
git config --global user.email "actions@github.com"
|
|
191
|
+
|
|
192
|
+
echo "Creating tag ${{ steps.version.outputs.tag_name }} for current commit"
|
|
193
|
+
git tag -a ${{ steps.version.outputs.tag_name }} -m "Release ${{ steps.version.outputs.tag_name }}"
|
|
194
|
+
git push origin ${{ steps.version.outputs.tag_name }}
|
|
195
|
+
echo "Tag ${{ steps.version.outputs.tag_name }} created and pushed"
|
|
196
|
+
|
|
197
|
+
create-release:
|
|
198
|
+
runs-on: ubuntu-latest
|
|
199
|
+
needs: prepare-version
|
|
200
|
+
if: needs.prepare-version.outputs.tag_name != ''
|
|
201
|
+
permissions:
|
|
202
|
+
contents: write
|
|
203
|
+
outputs:
|
|
204
|
+
version: ${{ needs.prepare-version.outputs.version }}
|
|
205
|
+
pypi_version: ${{ needs.prepare-version.outputs.pypi_version }}
|
|
206
|
+
git_hash: ${{ needs.prepare-version.outputs.git_hash }}
|
|
207
|
+
tag_name: ${{ needs.prepare-version.outputs.tag_name }}
|
|
208
|
+
is_prerelease: ${{ needs.prepare-version.outputs.is_prerelease }}
|
|
209
|
+
dev_status: ${{ needs.prepare-version.outputs.dev_status }}
|
|
210
|
+
|
|
211
|
+
steps:
|
|
212
|
+
- name: Checkout repository
|
|
213
|
+
uses: actions/checkout@v4
|
|
214
|
+
with:
|
|
215
|
+
submodules: false
|
|
216
|
+
fetch-depth: 0
|
|
217
|
+
ref: ${{ needs.prepare-version.outputs.tag_name }}
|
|
218
|
+
|
|
219
|
+
- name: Create GitHub Release
|
|
220
|
+
uses: softprops/action-gh-release@v1
|
|
221
|
+
with:
|
|
222
|
+
name: IDA Domain v${{ needs.prepare-version.outputs.pypi_version }}
|
|
223
|
+
tag_name: ${{ needs.prepare-version.outputs.tag_name }}
|
|
224
|
+
body: |
|
|
225
|
+
# IDA Domain v${{ needs.prepare-version.outputs.pypi_version }}
|
|
226
|
+
|
|
227
|
+
${{ needs.prepare-version.outputs.is_prerelease == 'true' && '⚠️ **PRE-RELEASE VERSION**: This is a pre-release intended for testing purposes. APIs may change without notice and pre-release versions may be deleted at any time.' || '' }}
|
|
228
|
+
|
|
229
|
+
Built from tag: ${{ needs.prepare-version.outputs.tag_name }}
|
|
230
|
+
Commit: ${{ needs.prepare-version.outputs.git_hash }}
|
|
231
|
+
|
|
232
|
+
## Installation
|
|
233
|
+
|
|
234
|
+
${{ github.event.inputs.publish_to_pypi == 'true' && '### From PyPI
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Install from PyPI' || '' }}
|
|
238
|
+
${{ needs.prepare-version.outputs.is_prerelease == 'true' && 'pip install --pre ida-domain' || 'pip install ida-domain' }}${{ github.event.inputs.publish_to_pypi == 'true' && '
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### From Source
|
|
242
|
+
|
|
243
|
+
' || '' }}This release contains the source code for the IDA Domain API.
|
|
244
|
+
|
|
245
|
+
To use this release:
|
|
246
|
+
1. Clone or download the source code from this tag
|
|
247
|
+
2. Follow the build instructions in the README
|
|
248
|
+
|
|
249
|
+
This release was automatically generated by GitHub Actions.
|
|
250
|
+
draft: false
|
|
251
|
+
prerelease: ${{ needs.prepare-version.outputs.is_prerelease == 'true' }}
|
|
252
|
+
generate_release_notes: true
|
|
253
|
+
env:
|
|
254
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
255
|
+
|
|
256
|
+
build-package:
|
|
257
|
+
runs-on: ubuntu-latest
|
|
258
|
+
needs: [prepare-version, create-release]
|
|
259
|
+
|
|
260
|
+
steps:
|
|
261
|
+
- name: Checkout repository
|
|
262
|
+
uses: actions/checkout@v4
|
|
263
|
+
with:
|
|
264
|
+
submodules: false
|
|
265
|
+
fetch-depth: 0
|
|
266
|
+
ref: ${{ needs.prepare-version.outputs.tag_name }}
|
|
267
|
+
|
|
268
|
+
- name: Install uv
|
|
269
|
+
uses: astral-sh/setup-uv@v4
|
|
270
|
+
with:
|
|
271
|
+
enable-cache: true
|
|
272
|
+
|
|
273
|
+
- name: Set up Python
|
|
274
|
+
run: uv python install 3.11
|
|
275
|
+
|
|
276
|
+
- name: Update version in pyproject.toml
|
|
277
|
+
run: |
|
|
278
|
+
# Update version in pyproject.toml to use PyPI-compliant version
|
|
279
|
+
echo "Updating version to ${{ needs.prepare-version.outputs.pypi_version }} in pyproject.toml"
|
|
280
|
+
|
|
281
|
+
# Use sed to replace the version line in pyproject.toml
|
|
282
|
+
sed -i 's/^version = .*/version = "${{ needs.prepare-version.outputs.pypi_version }}"/' pyproject.toml
|
|
283
|
+
|
|
284
|
+
# Verify the change
|
|
285
|
+
echo "Updated pyproject.toml version:"
|
|
286
|
+
grep "^version" pyproject.toml
|
|
287
|
+
|
|
288
|
+
- name: Add development status classifier for pre-releases
|
|
289
|
+
if: needs.prepare-version.outputs.is_prerelease == 'true'
|
|
290
|
+
run: |
|
|
291
|
+
# Add development status classifier to pyproject.toml
|
|
292
|
+
echo "Adding development status classifier: ${{ needs.prepare-version.outputs.dev_status }}"
|
|
293
|
+
|
|
294
|
+
# Find the classifiers section and add the development status
|
|
295
|
+
if grep -q "classifiers = \[" pyproject.toml; then
|
|
296
|
+
# Add after the opening bracket of classifiers
|
|
297
|
+
sed -i '/classifiers = \[/a\ "${{ needs.prepare-version.outputs.dev_status }}",' pyproject.toml
|
|
298
|
+
else
|
|
299
|
+
echo "Warning: Could not find classifiers section in pyproject.toml"
|
|
300
|
+
fi
|
|
301
|
+
|
|
302
|
+
- name: Build Python package
|
|
303
|
+
run: |
|
|
304
|
+
echo "Building Python package with uv..."
|
|
305
|
+
|
|
306
|
+
# Sync dependencies (this will create a virtual environment)
|
|
307
|
+
uv sync --extra dev
|
|
308
|
+
|
|
309
|
+
# Build the package using uv
|
|
310
|
+
uv build
|
|
311
|
+
|
|
312
|
+
echo "Built package files:"
|
|
313
|
+
ls -la dist/
|
|
314
|
+
|
|
315
|
+
- name: Verify package
|
|
316
|
+
run: |
|
|
317
|
+
# Install twine for package verification
|
|
318
|
+
uv add --dev twine
|
|
319
|
+
|
|
320
|
+
# Verify the built packages
|
|
321
|
+
echo "Verifying package integrity..."
|
|
322
|
+
uv run twine check dist/*.whl dist/*.tar.gz
|
|
323
|
+
|
|
324
|
+
- name: Upload Python package artifacts
|
|
325
|
+
uses: actions/upload-artifact@v4
|
|
326
|
+
with:
|
|
327
|
+
name: python-package-dist
|
|
328
|
+
path: dist/
|
|
329
|
+
retention-days: 14
|
|
330
|
+
|
|
331
|
+
publish-package:
|
|
332
|
+
runs-on: ubuntu-latest
|
|
333
|
+
needs: [prepare-version, create-release, build-package]
|
|
334
|
+
if: github.event.inputs.publish_to_pypi == 'true'
|
|
335
|
+
|
|
336
|
+
steps:
|
|
337
|
+
- name: Download package artifacts
|
|
338
|
+
uses: actions/download-artifact@v4
|
|
339
|
+
with:
|
|
340
|
+
name: python-package-dist
|
|
341
|
+
path: dist/
|
|
342
|
+
|
|
343
|
+
- name: Set up Python
|
|
344
|
+
uses: actions/setup-python@v5
|
|
345
|
+
with:
|
|
346
|
+
python-version: '3.11'
|
|
347
|
+
|
|
348
|
+
- name: Install publishing tools
|
|
349
|
+
run: |
|
|
350
|
+
python -m pip install --upgrade pip
|
|
351
|
+
pip install twine uv
|
|
352
|
+
|
|
353
|
+
- name: Verify package before publishing
|
|
354
|
+
run: |
|
|
355
|
+
echo "Final verification before publishing..."
|
|
356
|
+
echo "Package files to publish:"
|
|
357
|
+
ls -la dist/
|
|
358
|
+
|
|
359
|
+
# Final verification with twine
|
|
360
|
+
twine check dist/*.whl dist/*.tar.gz
|
|
361
|
+
|
|
362
|
+
- name: Publish to PyPI
|
|
363
|
+
run: |
|
|
364
|
+
echo "Publishing to PyPI..."
|
|
365
|
+
echo "PyPI version: ${{ needs.prepare-version.outputs.pypi_version }}"
|
|
366
|
+
echo "Is pre-release: ${{ needs.prepare-version.outputs.is_prerelease }}"
|
|
367
|
+
|
|
368
|
+
# Publish using uv publish
|
|
369
|
+
uv publish \
|
|
370
|
+
--token ${{ secrets.PYPI_API_TOKEN }} \
|
|
371
|
+
--verbose \
|
|
372
|
+
dist/*
|
|
373
|
+
env:
|
|
374
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
375
|
+
|
|
376
|
+
- name: Verify PyPI publication
|
|
377
|
+
run: |
|
|
378
|
+
echo "Waiting for package to be available on PyPI..."
|
|
379
|
+
sleep 30
|
|
380
|
+
|
|
381
|
+
# Try to install the published package to verify it's available
|
|
382
|
+
echo "Attempting to install published package..."
|
|
383
|
+
if [[ "${{ needs.prepare-version.outputs.is_prerelease }}" == "true" ]]; then
|
|
384
|
+
pip install --pre ida-domain==${{ needs.prepare-version.outputs.pypi_version }} || echo "Package not yet available on PyPI"
|
|
385
|
+
else
|
|
386
|
+
pip install ida-domain==${{ needs.prepare-version.outputs.pypi_version }} || echo "Package not yet available on PyPI"
|
|
387
|
+
fi
|
|
388
|
+
|
|
389
|
+
cleanup-on-failure:
|
|
390
|
+
runs-on: ubuntu-latest
|
|
391
|
+
needs: [prepare-version, create-release, build-package, publish-package]
|
|
392
|
+
if: always() && contains(needs.*.result, 'failure')
|
|
393
|
+
permissions:
|
|
394
|
+
contents: write
|
|
395
|
+
|
|
396
|
+
steps:
|
|
397
|
+
- name: Checkout repository
|
|
398
|
+
uses: actions/checkout@v4
|
|
399
|
+
with:
|
|
400
|
+
fetch-depth: 0
|
|
401
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
402
|
+
|
|
403
|
+
- name: Delete tag if job fails
|
|
404
|
+
run: |
|
|
405
|
+
echo "Workflow failed. Deleting tag ${{ needs.prepare-version.outputs.tag_name }}"
|
|
406
|
+
git config --global user.name "GitHub Actions"
|
|
407
|
+
git config --global user.email "actions@github.com"
|
|
408
|
+
|
|
409
|
+
# Delete the tag remotely
|
|
410
|
+
git push origin --delete ${{ needs.prepare-version.outputs.tag_name }} || echo "Failed to delete remote tag, it may not exist"
|
|
411
|
+
|
|
412
|
+
# Delete the tag locally
|
|
413
|
+
git tag -d ${{ needs.prepare-version.outputs.tag_name }} || echo "Failed to delete local tag, it may not exist"
|
|
414
|
+
|
|
415
|
+
echo "Tag cleanup completed"
|
|
416
|
+
echo "GitHub release may have been created - check the releases page and delete manually if needed"
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Build and Deploy Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
pages: write
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
16
|
+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
17
|
+
concurrency:
|
|
18
|
+
group: "pages"
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
build-docs:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout repository
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
|
|
31
|
+
- name: Install uv
|
|
32
|
+
uses: astral-sh/setup-uv@v4
|
|
33
|
+
with:
|
|
34
|
+
enable-cache: true
|
|
35
|
+
|
|
36
|
+
- name: Set up Python
|
|
37
|
+
run: uv python install 3.11
|
|
38
|
+
|
|
39
|
+
- name: Install system dependencies
|
|
40
|
+
run: |
|
|
41
|
+
sudo apt-get update
|
|
42
|
+
sudo apt-get install -y pandoc
|
|
43
|
+
|
|
44
|
+
- name: Install Python dependencies and build docs
|
|
45
|
+
run: |
|
|
46
|
+
# Sync dependencies (includes dev dependencies with sphinx)
|
|
47
|
+
uv sync --extra dev
|
|
48
|
+
|
|
49
|
+
# Build documentation using uv run
|
|
50
|
+
cd docs
|
|
51
|
+
make clean && make html
|
|
52
|
+
|
|
53
|
+
# Create a .nojekyll file to allow files starting with underscore
|
|
54
|
+
touch _build/html/.nojekyll
|
|
55
|
+
|
|
56
|
+
# List the generated files for debugging
|
|
57
|
+
echo "Generated documentation files:"
|
|
58
|
+
find _build/html -type f | head -20
|
|
59
|
+
|
|
60
|
+
- name: Setup Pages
|
|
61
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
62
|
+
uses: actions/configure-pages@v4
|
|
63
|
+
|
|
64
|
+
- name: Upload artifact
|
|
65
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
66
|
+
uses: actions/upload-pages-artifact@v3
|
|
67
|
+
with:
|
|
68
|
+
path: docs/_build/html
|
|
69
|
+
|
|
70
|
+
deploy-docs:
|
|
71
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
72
|
+
environment:
|
|
73
|
+
name: github-pages
|
|
74
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
needs: build-docs
|
|
77
|
+
|
|
78
|
+
steps:
|
|
79
|
+
- name: Deploy to GitHub Pages
|
|
80
|
+
id: deployment
|
|
81
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
# IDE
|
|
132
|
+
.vscode/
|
|
133
|
+
.idea/
|
|
134
|
+
*.swp
|
|
135
|
+
*.swo
|
|
136
|
+
*~
|
|
137
|
+
|
|
138
|
+
# OS
|
|
139
|
+
.DS_Store
|
|
140
|
+
Thumbs.db
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Hex-Rays SA
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|