Skip to content

Commit 2b66bc7

Browse files
author
Kazuki Suzuki Przyborowski
committed
Small update
1 parent 6c6bcb0 commit 2b66bc7

File tree

14 files changed

+545
-4
lines changed

14 files changed

+545
-4
lines changed

.gitattributes

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
*.py ident
2+
*.php ident
3+
* text eol=lf
4+
5+
#
6+
## These files are binary and should be left untouched
7+
#
8+
9+
# (binary is a macro for -text -diff)
10+
*.png binary
11+
*.webp binary
12+
*.jpg binary
13+
*.jpeg binary
14+
*.gif binary
15+
*.ico binary
16+
*.mov binary
17+
*.mp4 binary
18+
*.mp3 binary
19+
*.flv binary
20+
*.fla binary
21+
*.swf binary
22+
*.gz binary
23+
*.zip binary
24+
*.7z binary
25+
*.ttf binary
26+
*.eot binary
27+
*.woff binary
28+
*.pyc binary
29+
*.pdf binary
30+
*.arc binary

.github/workflows/pylint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pylint
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8", "3.9", "3.10"]
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install pylint
21+
- name: Analysing the code with pylint
22+
run: |
23+
pylint $(git ls-files '*.py')
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Python package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 5
11+
matrix:
12+
python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12]
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
- name: Lint with flake8
24+
run: |
25+
pip install flake8
26+
# stop the build if there are Python syntax errors or undefined names
27+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
29+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
30+
- name: Test with pytest
31+
run: |
32+
pip install pytest
33+
pytest
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# PyNeoFile
2-
About A tar like file format name NeoFile
1+
A tar like file format name NeoFile
2+
![](logo.png?raw=true)

logo.png

1000 KB
Loading

logo.webp

241 KB
Loading

neofile.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,25 @@
1616
import os, sys, argparse, tempfile, tarfile, io, base64
1717
import pyneofile as N
1818

19-
__program_name__ = "pyneofile"
20-
__version__ = "0.2.0"
19+
__project__ = pyneofile.__project__
20+
__program_name__ = pyneofile.__program_name__
21+
__file_format_name__ = pyneofile.__file_format_name__
22+
__file_format_magic__ = pyneofile.__file_format_magic__
23+
__file_format_len__ = pyneofile.__file_format_len__
24+
__file_format_hex__ = pyneofile.__file_format_hex__
25+
__file_format_delimiter__ = pyneofile.__file_format_delimiter__
26+
__file_format_dict__ = pyneofile.__file_format_dict__
27+
__file_format_default__ = pyneofile.__file_format_default__
28+
__file_format_multi_dict__ = pyneofile.__file_format_multi_dict__
29+
__use_new_style__ = pyneofile.__use_new_style__
30+
__use_advanced_list__ = pyneofile.__use_advanced_list__
31+
__use_alt_inode__ = pyneofile.__use_alt_inode__
32+
__project_url__ = pyneofile.__project_url__
33+
__version_info__ = pyneofile.__version_info__
34+
__version_date_info__ = pyneofile.__version_date_info__
35+
__version_date__ = pyneofile.__version_date__
36+
__version_date_plusrc__ = pyneofile.__version_date_plusrc__
37+
__version__ = pyneofile.__version__
2138

2239
def _stdout_bin():
2340
return getattr(sys.stdout, "buffer", sys.stdout)

pyneofile.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,26 @@
5353
_lzma = None
5454
_HAVE_LZMA = False
5555

56+
__program_name__ = "PyNeoFile"
57+
__project__ = __program_name__
58+
__project_url__ = "https://github.com/GameMaker2k/PyNeoFile"
59+
__version_info__ = (0, 19, 8, "RC 1", 1)
60+
__version_date_info__ = (2025, 8, 14, "RC 1", 1)
61+
__version_date__ = str(__version_date_info__[0]) + "." + str(
62+
__version_date_info__[1]).zfill(2) + "." + str(__version_date_info__[2]).zfill(2)
63+
__revision__ = __version_info__[3]
64+
__revision_id__ = "$Id$"
65+
if(__version_info__[4] is not None):
66+
__version_date_plusrc__ = __version_date__ + \
67+
"-" + str(__version_date_info__[4])
68+
if(__version_info__[4] is None):
69+
__version_date_plusrc__ = __version_date__
70+
if(__version_info__[3] is not None):
71+
__version__ = str(__version_info__[0]) + "." + str(__version_info__[
72+
1]) + "." + str(__version_info__[2]) + " " + str(__version_info__[3])
73+
if(__version_info__[3] is None):
74+
__version__ = str(__version_info__[0]) + "." + str(__version_info__[1]) + "." + str(__version_info__[2])
75+
5676
def _normalize_algo(algo):
5777
if not algo:
5878
return 'none'

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[project]
2+
name = "PyArchiveFile"
3+
version = "0.19.8"
4+
readme = "README.md"
5+
license = { text = "BSD-3-Clause" }
6+
keywords = []
7+
description = "A tar like file format name archivefile."
8+
authors = [
9+
{ name = "Kazuki Przyborowski", email = "[email protected]" },
10+
]
11+

0 commit comments

Comments
 (0)