Compare commits

...

10 Commits

14 changed files with 82 additions and 95 deletions
Generated
+1 -1
View File
@@ -269,7 +269,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]] [[package]]
name = "hyfetch" name = "hyfetch"
version = "2.0.3" version = "2.0.4"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"ansi_colours", "ansi_colours",
+1 -1
View File
@@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/*"] members = ["crates/*"]
[workspace.package] [workspace.package]
version = "2.0.3" version = "2.0.4"
authors = ["Azalea Gui <azalea@hydev.org>"] authors = ["Azalea Gui <azalea@hydev.org>"]
edition = "2021" edition = "2021"
rust-version = "1.75.0" rust-version = "1.75.0"
-9
View File
@@ -1,9 +0,0 @@
include hyfetch/scripts/*
recursive-exclude tools *
recursive-exclude .github *
recursive-exclude .vscode *
exclude .gitignore
exclude .gitattributes
exclude package.json
exclude CONTRIBUTING.md
+8
View File
@@ -129,6 +129,14 @@ cargo install --git https://github.com/hykilpikonna/hyfetch
<!-- CHANGELOG STARTS HERE ---> <!-- CHANGELOG STARTS HERE --->
### 2.0.4
**🔧 Building Pipeline Refactoring**
* Modernize Python building toolchain from `setup.py` to `pyproject.toml`
* Fixed a bug where Windows binaries are mistakenly built into Unix packages.
* Fixed a bug where `presets.json` was not being included in the built package.
### 2.0.3 ### 2.0.3
(changelog is generated by Gemini from commit history) (changelog is generated by Gemini from commit history)
+3 -1
View File
@@ -2,7 +2,9 @@ use std::borrow::Cow;
use std::ffi::OsStr; use std::ffi::OsStr;
#[cfg(feature = "macchina")] #[cfg(feature = "macchina")]
use std::fs; use std::fs;
use std::io::{self, Write as _}; use std::io::{Write as _};
#[cfg(windows)]
use std::io::{self};
use std::path::PathBuf; use std::path::PathBuf;
use std::process::Command; use std::process::Command;
use std::sync::OnceLock; use std::sync::OnceLock;
+2 -2
View File
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH VERSION: "1" "October 2025" "Version: 2.0.3" "User Commands" .TH VERSION: "1" "October 2025" "Version: 2.0.4" "User Commands"
.SH NAME .SH NAME
Version: \- manual page for Version: 2.0.3 Version: \- manual page for Version: 2.0.4
.SH SYNOPSIS .SH SYNOPSIS
.B hyfetch .B hyfetch
[\fI\,-c\/\fR] [\fI\,-C=CONFIG_FILE\/\fR] [\fI\,-p=PRESET\/\fR] [\fI\,-m=MODE\/\fR] [\fI\,-b=BACKEND\/\fR] [\fI\,--args=ARGS\/\fR] [\fI\,--c-scale=\/\fR [\fI\,-c\/\fR] [\fI\,-C=CONFIG_FILE\/\fR] [\fI\,-p=PRESET\/\fR] [\fI\,-m=MODE\/\fR] [\fI\,-b=BACKEND\/\fR] [\fI\,--args=ARGS\/\fR] [\fI\,--c-scale=\/\fR
+2 -2
View File
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
.TH NEOFETCH "1" "October 2025" "Neofetch 8.0.3" "User Commands" .TH NEOFETCH "1" "October 2025" "Neofetch 8.0.4" "User Commands"
.SH NAME .SH NAME
Neofetch \- manual page for Neofetch 8.0.3 Neofetch \- manual page for Neofetch 8.0.4
.SH SYNOPSIS .SH SYNOPSIS
.B neofetch .B neofetch
\fI\,func_name --option "value" --option "value"\/\fR \fI\,func_name --option "value" --option "value"\/\fR
+1 -1
View File
@@ -1,3 +1,3 @@
from __future__ import annotations from __future__ import annotations
VERSION = '2.0.3' VERSION = '2.0.4'
+1 -1
View File
@@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
version=8.0.3 version=8.0.4
# Fallback to a value of '5' for shells which support bash # Fallback to a value of '5' for shells which support bash
# but do not set the 'BASH_' shell variables (osh). # but do not set the 'BASH_' shell variables (osh).
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "neowofetch", "name": "neowofetch",
"version": "2.0.3", "version": "2.0.4",
"description": "Updated neofetch", "description": "Updated neofetch",
"repository": { "repository": {
"type": "git", "type": "git",
+52
View File
@@ -0,0 +1,52 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "HyFetch"
dynamic = ["version"]
description = "neofetch with flags <3"
readme = "README.md"
authors = [
{ name = "Azalea Gui", email = "me@hydev.org" },
]
requires-python = ">=3.7"
license = "MIT"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
# Universal dependencies
'typing_extensions; python_version < "3.8"',
# Windows dependencies
'psutil ; platform_system=="Windows"',
'colorama>=0.4.6 ; platform_system=="Windows"',
]
[project.urls]
Homepage = "https://github.com/hykilpikonna/HyFetch"
[project.scripts]
"hyfetch.v1" = "hyfetch.__main__:run_py"
"hyfetch.rs" = "hyfetch.__main__:run_rust"
"hyfetch" = "hyfetch.__main__:run_rust"
[tool.hatch.version]
source = "regex"
path = "Cargo.toml"
regex = 'version = "(?P<version>.+?)"'
[tool.hatch.build]
exclude = ["/tools"]
[tool.hatch.build.targets.wheel.files]
"{py_scripts}/neowofetch" = "hyfetch/scripts/neowofetch"
-58
View File
@@ -1,58 +0,0 @@
#!/usr/bin/env python3
from pathlib import Path
from setuptools import setup, find_namespace_packages
# The directory containing this file
HERE = Path(__file__).parent
# Load version without importing it (see issue #192 if you are confused)
VERSION = [l for l in (HERE / "Cargo.toml").read_text('utf-8').splitlines() if l.startswith("version = ")]
if len(VERSION) != 1:
raise ValueError(f"Cannot determine version from Cargo.toml: {VERSION}")
VERSION = VERSION[0].split('"')[1]
# The text of the README file
README = (HERE / "README.md").read_text('utf-8')
# This call to setup() does all the work
setup(
name="HyFetch",
version=VERSION,
description="neofetch with flags <3",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/hykilpikonna/HyFetch",
author="Azalea Gui",
author_email="me@hydev.org",
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
packages=find_namespace_packages(exclude=("tools", "tools.*")),
package_data={'hyfetch': ['hyfetch/*']},
include_package_data=True,
install_requires=[
# Universal dependencies
'typing_extensions; python_version < "3.8"',
# Windows dependencies
'psutil ; platform_system=="Windows"',
'colorama>=0.4.6 ; platform_system=="Windows"',
],
entry_points={
"console_scripts": [
"hyfetch.v1=hyfetch.__main__:run_py",
"hyfetch.rs=hyfetch.__main__:run_rust",
"hyfetch=hyfetch.__main__:run_rust",
]
},
scripts=['hyfetch/scripts/neowofetch']
)
+7 -9
View File
@@ -16,8 +16,9 @@ rm -rf build/
# Remove git from the source code before building # Remove git from the source code before building
rm -rf hyfetch/git/ rm -rf hyfetch/git/
# Build python from setup.py # Build python package
python3 setup.py sdist bdist_wheel python3 -m pip install build
python3 -m build
# Check # Check
twine check dist/*.tar.gz twine check dist/*.tar.gz
@@ -61,11 +62,6 @@ cp "$DIR/../target/x86_64-pc-windows-gnu/release/hyfetch.exe" wheel/hyfetch/rust
sed -i 's/Tag: py3-none-.*/Tag: py3-none-win32/' wheel/*.dist-info/WHEEL sed -i 's/Tag: py3-none-.*/Tag: py3-none-win32/' wheel/*.dist-info/WHEEL
python "$DIR/build_rehash.py" wheel python "$DIR/build_rehash.py" wheel
# Zip to -win32.whl
#new_name=${file/-any/-win32}
#cd wheel && zip -qq -y -r "../$new_name" * && cd ..
#twine check "$new_name"
# Zip to -win_amd64.whl # Zip to -win_amd64.whl
# Since pypi doesn't allow two identical files with different names to be uploaded # Since pypi doesn't allow two identical files with different names to be uploaded
# We need to change the zip content a little bit for win_amd64 # We need to change the zip content a little bit for win_amd64
@@ -78,8 +74,10 @@ twine check "$new_name"
# ================= # =================
# Build for linux # Build for linux
# Now we're done with windows, delete the git folder # Now we're done with windows, delete wheel and unzip again
rm -rf wheel/git echo "> Building for other platforms"
rm -rf wheel
unzip -qq "$file" -d wheel
function build_for_platform() { function build_for_platform() {
ff_platform=$1 ff_platform=$1
+3 -9
View File
@@ -1,11 +1,5 @@
### Things to do before deploying... ### Things to do before deploying...
* [x] Check file permissions (+x) * [ ] Update changelog (`README.md`) and commit changes
* [x] Check Shellcheck (should be automatic) * [ ] Run `mamba activate 313` (an environment that has build deps e.g. twine)
* [x] Update version numbers (`README.md`, `package.json`, `hyfetch/constants.py`, `neofetch`) * [ ] Run `python tools/deploy-release.py {version}`
* [x] Update distro list in neofetch help (`tools/list_distros.py`)
* [x] Regenerate man page (`help2man ./neofetch > neofetch.1`)
* [ ] Create an RC release and deploy to pypi, try installing and testing on many distros.
* [ ] Change back to stable release, create tag, create GitHub release
* [x] Formally deploy to pypi and npm (`tools/deploy.sh`, `npm publish`)
* [ ] Update ArchLinux AUR and NixOS packaging