Skip to content

Commit c1889da

Browse files
authored
Merge pull request leixingyu#5 from hannesdelbeke/master
package this repo as a python module
2 parents ce79803 + 1fa229e commit c1889da

24 files changed

+83
-8
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Set up Python
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: '3.x'
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build
33+
- name: Build package
34+
run: python -m build
35+
- name: Publish package
36+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,23 @@ Hence the creation of this tool!
2525
The tool needs the following library to be installed:
2626

2727
- Qt for Python: [PySide2](https://pypi.org/project/PySide2/) or [PyQt5](https://pypi.org/project/PyQt5/)
28-
2928
- Python shim for all Qt bindings: [Qt.py](https://pypi.org/project/Qt.py/)
3029

3130

3231
### Add as Menu Button
3332

3433
The tool is meant to be launched from a menu bar button like such:
3534

36-
<div align="center">
3735
<img src="https://i.imgur.com/IcQGGu5.png" alt="menu">
38-
</div>
3936

4037
You can set up this very easily by adding `startup.py` as a startup script,
4138
under _Project Settings - Plugins - Python_
4239

43-
- download the project zip file where you can find the `startup.py`, add
44-
that location to the startup scripts:
45-
e.g. _"C:\Downloads\unrealScriptEditor\startup.py"_
40+
- download & extract the project zip file
41+
- find the `startup.py` location, and add it to the startup scripts: e.g. `C:\Downloads\unrealScriptEditor\startup.py`
4642

4743

48-
<div align="center">
4944
<img src="https://i.imgur.com/wJrkp5b.png" alt="menu">
50-
</div>
5145

5246
### Simple Launch Script
5347

@@ -63,6 +57,11 @@ global editor
6357
editor = main.show()
6458
```
6559

60+
### Install as module
61+
Install the module from the repo
62+
```bash
63+
python -m pip install git+https://github.com/hannesdelbeke/unreal-script-editor
64+
```
6665

6766
## Features
6867

pyproject.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm"]
3+
#build-backend = "setuptools.build_meta"
4+
5+
6+
[tool.setuptools]
7+
packages = ["unreal-script-editor"]
8+
9+
10+
[project]
11+
name = "unreal-script-editor"
12+
authors = [
13+
{name = "Lei Xingyu"},
14+
{name = "Hannes Delbeke"},
15+
]
16+
description = "A Qt Python script editor, styled in Unreal stylesheet"
17+
readme = "README.md"
18+
requires-python = ">=3.4"
19+
keywords = ["unreal", "scripter"]
20+
license = { file = "LICENSE" }
21+
classifiers = [
22+
"Programming Language :: Python :: 3.7",
23+
]
24+
#dynamic = ["dependencies"]
25+
dependencies = ['importlib-metadata; python_version<"3.7"', "Qt.py", "unreal-stylesheet"]
26+
#dynamic = ["version"]
27+
version = "0.0.1"
28+
29+
#[project.optional-dependencies]
30+
#yaml = ["pyyaml"]
31+
32+
#[project.scripts]
33+
#my-script = "my_package.module:function"
34+
35+
[project.urls]
36+
Homepage = "https://github.com/leixingyu/unrealScriptEditor"
37+
Source = "https://github.com/leixingyu/unrealScriptEditor"

codeEditor/.gitignore renamed to unreal-script-editor/codeEditor/.gitignore

File renamed without changes.
File renamed without changes.

codeEditor/__init__.py renamed to unreal-script-editor/codeEditor/__init__.py

File renamed without changes.

codeEditor/codeEditor.py renamed to unreal-script-editor/codeEditor/codeEditor.py

File renamed without changes.

codeEditor/highlighter/__init__.py renamed to unreal-script-editor/codeEditor/highlighter/__init__.py

File renamed without changes.

codeEditor/highlighter/jsonHighlight.py renamed to unreal-script-editor/codeEditor/highlighter/jsonHighlight.py

File renamed without changes.

0 commit comments

Comments
 (0)