-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With setuptools changes, it is increasingly hard to build using bdist…
…_rpm or test using setuptools. The setuptools 69.3.0 started to change dashes to underscores, leading to + /usr/lib/rpm/rpmuncompress -x -v /src/build/bdist.linux-x86_64/rpm/SOURCES/python-libssh-0.0.1.tar.gz error: File /src/build/bdist.linux-x86_64/rpm/SOURCES/python-libssh-0.0.1.tar.gz: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.deAYuh (%prep) pypa/setuptools#3593 The setuptools 72.0.2 removed setup.py test command, leading to /usr/lib/python3.13/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite' warnings.warn(msg) usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'test' pypa/setuptools#4519
- Loading branch information
Showing
7 changed files
with
109 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,40 @@ | ||
|
||
NAME = python-$(shell eval echo $$( awk '/^name/ { print $$NF }' pyproject.toml)) | ||
VERSION = $(shell eval echo $$( awk '/^version/ { print $$NF }' pyproject.toml)) | ||
DIST = dist | ||
SPECFILE = $(NAME).spec | ||
|
||
tar-gz: | ||
rm -rf $(DIST)/$(NAME)-$(VERSION) | ||
mkdir -p $(DIST)/$(NAME)-$(VERSION) | ||
cp -rp -t dist/$(NAME)-$(VERSION) $(shell ls | grep -v dist) | ||
for i in $(shell cat .gitignore) ; do rm -rf $(DIST)/$$i ; done | ||
tar -C $(DIST) -cvzf $(DIST)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) | ||
rm -rf $(DIST)/$(NAME)-$(VERSION) | ||
ls -l $(DIST)/*.tar.gz | ||
|
||
srpm: tar-gz | ||
rpmbuild -D '_srcrpmdir $(DIST)' -D '_sourcedir $(DIST)' -bs $(SPECFILE) | ||
ls -l $(DIST)/*.src.rpm | ||
|
||
dynamic-build-requires: tar-gz | ||
rpmbuild -D '_srcrpmdir $(DIST)' -D '_sourcedir $(PWD)/$(DIST)' -br $(SPECFILE) | ||
|
||
rpm: tar-gz | ||
rpmbuild -D '_rpmdir $(DIST)' -D '_sourcedir $(PWD)/$(DIST)' -bb $(SPECFILE) | ||
mv $(DIST)/$$(uname -m)/*.$$(uname -m).rpm $(DIST) | ||
ls -l $(DIST)/*.$$(uname -m).rpm | ||
# rpm -qlp $(DIST)/*.$$(uname -m).rpm | ||
# rpm -q --requires -p $(DIST)/*.$$(uname -m).rpm | ||
|
||
test: | ||
./test.sh | ||
|
||
test-pylint: | ||
pylint-3 --disable=R --disable=C --indent-string="\t" --extension-pkg-whitelist=rpm,lxml libssh.pyx | ||
|
||
clean: | ||
rm -rf $(shell cat .gitignore) | ||
|
||
.PHONY: tar-gz srpm rpm test test-pylint clean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
[project] | ||
name = "libssh" | ||
version = "0.0.1" | ||
authors = [{name = "Jan Pazdziora"}] | ||
license = {text = "GNU Lesser General Public License v2 (LGPLv2)"} | ||
description = "Python bindings to client functionality of libssh" | ||
classifiers = [ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", | ||
"Topic :: Security", | ||
] | ||
|
||
[build-system] | ||
requires = ["setuptools", "Cython"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
packages = ["libssh"] | ||
package-dir = {"libssh" = "."} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
Name: python-libssh | ||
Version: 0.0.1 | ||
Release: 1%{?dist} | ||
|
||
Summary: Python bindings to client functionality of libssh | ||
License: LGPLv2 | ||
URL: https://github.com/adelton/python-libssh | ||
Source0: %{name}-%{version}.tar.gz | ||
|
||
BuildRequires: libssh-devel | ||
BuildRequires: python3-devel | ||
BuildRequires: python3-wheel | ||
|
||
%description | ||
Python bindings to client functionality of libssh. | ||
|
||
%prep | ||
%autosetup | ||
|
||
%generate_buildrequires | ||
%pyproject_buildrequires -p | ||
|
||
%build | ||
%pyproject_wheel | ||
|
||
%install | ||
%pyproject_install | ||
|
||
%pyproject_save_files -l libssh | ||
|
||
%files -f %{pyproject_files} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters