Skip to content

Commit bf82ca8

Browse files
committed
Merge branch 'develop'
2 parents 552948b + 6a1808f commit bf82ca8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+204
-216
lines changed

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
* text=auto
22
*.whl binary diff=zip
3-
*.pyxapp linguist-language=Python

.gitignore

+1-160
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,4 @@
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/
131
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
share/python-wheels/
24-
*.egg-info/
25-
.installed.cfg
26-
*.egg
27-
MANIFEST
28-
29-
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32-
*.manifest
33-
*.spec
34-
35-
# Installer logs
36-
pip-log.txt
37-
pip-delete-this-directory.txt
38-
39-
# Unit test / coverage reports
40-
htmlcov/
41-
.tox/
42-
.nox/
43-
.coverage
44-
.coverage.*
45-
.cache
46-
nosetests.xml
47-
coverage.xml
48-
*.cover
49-
*.py,cover
50-
.hypothesis/
51-
.pytest_cache/
52-
cover/
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-
.pybuilder/
76-
target/
77-
78-
# Jupyter Notebook
79-
.ipynb_checkpoints
80-
81-
# IPython
82-
profile_default/
83-
ipython_config.py
84-
85-
# pyenv
86-
# For a library or package, you might want to ignore these files since the code is
87-
# intended to run in multiple environments; otherwise, check them in:
88-
# .python-version
89-
90-
# pipenv
91-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94-
# install all needed dependencies.
95-
#Pipfile.lock
96-
97-
# poetry
98-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99-
# This is especially recommended for binary packages to ensure reproducibility, and is more
100-
# commonly ignored for libraries.
101-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102-
#poetry.lock
103-
104-
# pdm
105-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106-
#pdm.lock
107-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108-
# in version control.
109-
# https://pdm.fming.dev/#use-with-ide
110-
.pdm.toml
111-
112-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113-
__pypackages__/
114-
115-
# Celery stuff
116-
celerybeat-schedule
117-
celerybeat.pid
118-
119-
# SageMath parsed files
120-
*.sage.py
121-
122-
# Environments
123-
.env
124-
.venv
125-
env/
1262
venv/
127-
ENV/
128-
env.bak/
129-
venv.bak/
130-
131-
# Spyder project settings
132-
.spyderproject
133-
.spyproject
134-
135-
# Rope project settings
136-
.ropeproject
137-
138-
# mkdocs documentation
139-
/site
140-
141-
# mypy
142-
.mypy_cache/
143-
.dmypy.json
144-
dmypy.json
145-
146-
# Pyre type checker
147-
.pyre/
148-
149-
# pytype static type analyzer
150-
.pytype/
151-
152-
# Cython debug symbols
153-
cython_debug/
154-
155-
# PyCharm
156-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158-
# and can be added to the global gitignore or merged into this file. For a more nuclear
159-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
#.idea/
161-
162-
# Pyxel
3+
*.pyc
1634
.DS_Store

.vscode/settings.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
{
2-
"files.exclude": {
3-
"server/pyodide/*": true
4-
},
5-
"rust-analyzer.linkedProjects": [
6-
"crates/pyxel-platform/Cargo.toml",
7-
"crates/pyxel-engine/Cargo.toml",
8-
"crates/pyxel-wrapper/Cargo.toml"
9-
]
2+
"rust-analyzer.linkedProjects": ["rust/Cargo.toml"]
103
}

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 2.0.8
4+
5+
- Changed the directory structure of the project
6+
- Organized project metadata for Rust and Python
7+
38
## 2.0.7
49

510
- Turned off the high DPI mode for performance perspective

Makefile

+12-26
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444

4545
ROOT_DIR = .
4646
DIST_DIR = $(ROOT_DIR)/dist
47-
PYXEL_DIR = $(ROOT_DIR)/python/pyxel
48-
CRATES_DIR = $(ROOT_DIR)/crates
47+
RUST_DIR = $(ROOT_DIR)/rust
48+
PYTHON_DIR = $(ROOT_DIR)/python
49+
EXAMPLES_DIR = $(PYTHON_DIR)/pyxel/examples
4950
SCRIPTS_DIR = $(ROOT_DIR)/scripts
50-
EXAMPLES_DIR = $(PYXEL_DIR)/examples
5151
WASM_DIR = $(ROOT_DIR)/wasm
5252
WASM_ENV = RUSTUP_TOOLCHAIN=nightly
5353
WASM_TARGET = wasm32-unknown-emscripten
@@ -68,37 +68,23 @@ endif
6868
all: build
6969

7070
clean:
71-
@cd $(CRATES_DIR)/pyxel-platform; cargo clean $(BUILD_OPTS)
72-
@cd $(CRATES_DIR)/pyxel-engine; cargo clean $(BUILD_OPTS)
73-
@cd $(CRATES_DIR)/pyxel-wrapper; cargo clean $(BUILD_OPTS)
71+
@cd $(RUST_DIR); cargo clean $(BUILD_OPTS)
7472

7573
distclean:
7674
@rm -rf $(DIST_DIR)
77-
@rm -rf $(CRATES_DIR)/pyxel-platform/target
78-
@rm -rf $(CRATES_DIR)/pyxel-engine/target
79-
@rm -rf $(CRATES_DIR)/pyxel-wrapper/target
75+
@rm -rf $(RUST_DIR)/target
8076

8177
lint:
82-
@cd $(CRATES_DIR)/pyxel-platform; cargo +nightly clippy $(CLIPPY_OPTS)
83-
@cd $(CRATES_DIR)/pyxel-platform; cargo +nightly clippy --target $(WASM_TARGET) $(CLIPPY_OPTS)
84-
@cd $(CRATES_DIR)/pyxel-engine; cargo +nightly clippy $(CLIPPY_OPTS)
85-
@cd $(CRATES_DIR)/pyxel-engine; cargo +nightly clippy --target $(WASM_TARGET) $(CLIPPY_OPTS)
86-
@cd $(CRATES_DIR)/pyxel-wrapper; cargo +nightly clippy $(CLIPPY_OPTS)
87-
@cd $(CRATES_DIR)/pyxel-wrapper; cargo +nightly clippy --target $(WASM_TARGET) $(CLIPPY_OPTS)
78+
@cd $(RUST_DIR); cargo +nightly clippy $(CLIPPY_OPTS)
79+
@cd $(RUST_DIR); cargo +nightly clippy --target $(WASM_TARGET) $(CLIPPY_OPTS)
8880
@ruff check $(ROOT_DIR)
8981

9082
update:
91-
@cd $(CRATES_DIR)/pyxel-platform; cargo update
92-
@cd $(CRATES_DIR)/pyxel-engine; cargo update
93-
@cd $(CRATES_DIR)/pyxel-wrapper; cargo update
94-
@cd $(CRATES_DIR)/pyxel-platform; cargo outdated --root-deps-only
95-
@cd $(CRATES_DIR)/pyxel-engine; cargo outdated --root-deps-only
96-
@cd $(CRATES_DIR)/pyxel-wrapper; cargo outdated --root-deps-only
83+
@cd $(RUST_DIR); cargo update
84+
@cd $(RUST_DIR); cargo outdated --root-deps-only
9785

9886
format:
99-
@cd $(CRATES_DIR)/pyxel-platform; cargo +nightly fmt -- --emit=files
100-
@cd $(CRATES_DIR)/pyxel-engine; cargo +nightly fmt -- --emit=files
101-
@cd $(CRATES_DIR)/pyxel-wrapper; cargo +nightly fmt -- --emit=files
87+
@cd $(RUST_DIR); cargo +nightly fmt -- --emit=files
10288
@ruff format $(ROOT_DIR)
10389

10490
build: format
@@ -110,8 +96,8 @@ install: build
11096
@pip3 install --force-reinstall `ls -rt $(DIST_DIR)/*.whl | tail -n 1`
11197

11298
test: install
113-
@cd $(CRATES_DIR)/pyxel-engine; cargo test $(BUILD_OPTS)
114-
@python3 -m unittest discover $(CRATES_DIR)/pyxel-wrapper/tests
99+
#@cd $(RUST_DIR); cargo test $(BUILD_OPTS)
100+
@python3 -m unittest discover $(RUST_DIR)/pyxel-wrapper/tests
115101
@pyxel run $(EXAMPLES_DIR)/01_hello_pyxel.py
116102
@pyxel run $(EXAMPLES_DIR)/02_jump_game.py
117103
@pyxel run $(EXAMPLES_DIR)/03_draw_api.py

pyproject.toml

+10-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ build-backend = "maturin"
44

55
[project]
66
name = "pyxel"
7-
version = "2.0.7"
7+
version = "2.0.8"
8+
requires-python = ">=3.7"
9+
authors = [{ name = "Takashi Kitao", email = "takashi.kitao@gmail.com" }]
810
description = "A retro game engine for Python"
911
readme = "docs/README-abspath.md"
10-
requires-python = ">=3.7"
1112
license = { file = "LICENSE" }
12-
authors = [{ name = "Takashi Kitao", email = "takashi.kitao@gmail.com" }]
13+
keywords = ["game", "gamedev"]
1314
classifiers = [
1415
"Development Status :: 5 - Production/Stable",
1516
"License :: OSI Approved :: MIT License",
@@ -22,13 +23,17 @@ classifiers = [
2223
"Topic :: Multimedia :: Graphics",
2324
"Topic :: Multimedia :: Sound/Audio",
2425
]
25-
urls = { homepage = "https://github.com/kitao/pyxel" }
26+
27+
[project.urls]
28+
Homepage = "https://github.com/kitao/pyxel"
29+
Repository = "https://github.com/kitao/pyxel.git"
30+
Changelog = "https://github.com/kitao/pyxel/blob/main/CHANGELOG.md"
2631

2732
[project.scripts]
2833
pyxel = "pyxel.cli:cli"
2934

3035
[tool.maturin]
31-
manifest-path = "crates/pyxel-wrapper/Cargo.toml"
36+
manifest-path = "rust/pyxel-wrapper/Cargo.toml"
3237
module-name = "pyxel.pyxel_wrapper"
3338
python-source = "python"
3439

0 commit comments

Comments
 (0)