public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/trash-cli] pr6: Update to latest upstream version
@ 2026-09-20 13:18 Ankur Sinha
0 siblings, 0 replies; only message in thread
From: Ankur Sinha @ 2026-09-20 13:18 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/trash-cli
Branch : pr6
Commit : c406e36e8f809ab865b7425af15f43ec7d5e4aea
Author : Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
Date : 2016-12-27T20:35:23+11:00
Stats : +16/-191 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/trash-cli/c/c406e36e8f809ab865b7425af15f43ec7d5e4aea?branch=pr6
Log:
Update to latest upstream version
---
diff --git a/.gitignore b/.gitignore
index 3d76d2f..198bb2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ trash-cli-0.11.2.tar.gz
/trash-cli-0.12.9.14.tar.gz
/trash-cli-0.12.9.14-git798b71d.tar.gz
/trash-cli-798b71d.tar.gz
+/trash-cli-0.16.12.26.tar.gz
diff --git a/0001-Rely-on-Python-to-open-close-files.patch b/0001-Rely-on-Python-to-open-close-files.patch
deleted file mode 100644
index a8dc82b..0000000
--- a/0001-Rely-on-Python-to-open-close-files.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From c39f4e92433fb27b42b36c2747cff63b98b11ccb Mon Sep 17 00:00:00 2001
-From: Antony Lee <anntzer.lee@gmail.com>
-Date: Tue, 16 Jun 2015 19:45:51 -0700
-Subject: [PATCH 1/2] Rely on Python to open/close files.
-
-Fixes #52.
----
- trashcli/list_mount_points.py | 31 ++++++++++++++-----------------
- 1 file changed, 14 insertions(+), 17 deletions(-)
-
-diff --git a/trashcli/list_mount_points.py b/trashcli/list_mount_points.py
-index 7f481f3..a26aef5 100644
---- a/trashcli/list_mount_points.py
-+++ b/trashcli/list_mount_points.py
-@@ -27,8 +27,8 @@ def _mount_points_from_df_output(df_output):
- yield line.split(None, 5)[-1]
-
- def _mounted_filesystems_from_getmnt() :
-- from ctypes import Structure, c_char_p, c_int, c_void_p, cdll, POINTER
-- from ctypes.util import find_library
-+ from ctypes import (
-+ c_char_p, c_int, c_void_p, cdll, POINTER, pythonapi, Structure, util)
- import sys
- class Filesystem:
- def __init__(self, mount_dir, type, name) :
-@@ -49,26 +49,23 @@ def _mounted_filesystems_from_getmnt() :
- if sys.platform == "cygwin":
- libc_name = "cygwin1.dll"
- else:
-- libc_name = find_library("c")
--
-- if libc_name == None :
-- libc_name="/lib/libc.so.6" # fix for my Gentoo 4.0
--
-+ libc_name = util.find_library("c") or "/lib/libc.so.6" # fix for my Gentoo 4.0
- libc = cdll.LoadLibrary(libc_name)
- libc.getmntent.restype = POINTER(mntent_struct)
-- libc.fopen.restype = c_void_p
-+ PyFile_AsFile = pythonapi.PyFile_AsFile
-+ PyFile_AsFile.argtypes = [pythonapi.py_object]
-
-- f = libc.fopen("/proc/mounts", "r")
-- if f==None:
-- f = libc.fopen("/etc/mtab", "r")
-- if f == None:
-+ try:
-+ f = open("/proc/mounts")
-+ except IOError:
-+ try:
-+ f = open("/etc/mtab")
-+ except IOError:
- raise IOError("Unable to open /proc/mounts nor /etc/mtab")
-
-- while True:
-- entry = libc.getmntent(f)
-- if bool(entry) == False:
-- libc.fclose(f)
-- break
-+ for entry in iter(lambda: libc.getmntent(PyFile_AsFile(f)), None):
- yield Filesystem(entry.contents.mnt_dir,
- entry.contents.mnt_type,
- entry.contents.mnt_fsname)
-+
-+ f.close()
---
-2.5.0
-
diff --git a/0002-Another-fix-that-does-not-depend-on-pythonapi.patch b/0002-Another-fix-that-does-not-depend-on-pythonapi.patch
deleted file mode 100644
index 97721d5..0000000
--- a/0002-Another-fix-that-does-not-depend-on-pythonapi.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 8ab3c23f70eb2f373df7c588317b21211ea1b185 Mon Sep 17 00:00:00 2001
-From: Antony Lee <anntzer.lee@gmail.com>
-Date: Wed, 24 Jun 2015 11:14:11 -0700
-Subject: [PATCH 2/2] Another fix that does not depend on pythonapi.
-
----
- trashcli/list_mount_points.py | 47 +++++++++++++++++++++++--------------------
- 1 file changed, 25 insertions(+), 22 deletions(-)
-
-diff --git a/trashcli/list_mount_points.py b/trashcli/list_mount_points.py
-index a26aef5..0d782bd 100644
---- a/trashcli/list_mount_points.py
-+++ b/trashcli/list_mount_points.py
-@@ -1,4 +1,11 @@
- # Copyright (C) 2009-2011 Andrea Francia Trivolzio(PV) Italy
-+from collections import namedtuple
-+from ctypes import Structure, c_char_p, c_int, c_void_p, cdll, POINTER
-+from ctypes.util import find_library
-+from itertools import imap, repeat, takewhile
-+import subprocess
-+import sys
-+
-
- def mount_points():
- try:
-@@ -6,15 +13,17 @@ def mount_points():
- except AttributeError:
- return mount_points_from_df()
-
-+
- def mount_points_from_getmnt():
- for elem in _mounted_filesystems_from_getmnt():
- yield elem.mount_dir
-
-+
- def mount_points_from_df():
-- import subprocess
- df_output = subprocess.Popen(["df", "-P"], stdout=subprocess.PIPE).stdout
- return list(_mount_points_from_df_output(df_output))
-
-+
- def _mount_points_from_df_output(df_output):
- def skip_header():
- df_output.readline()
-@@ -26,15 +35,11 @@ def _mount_points_from_df_output(df_output):
- line = chomp(line)
- yield line.split(None, 5)[-1]
-
-+
- def _mounted_filesystems_from_getmnt() :
-- from ctypes import (
-- c_char_p, c_int, c_void_p, cdll, POINTER, pythonapi, Structure, util)
-- import sys
-- class Filesystem:
-- def __init__(self, mount_dir, type, name) :
-- self.mount_dir = mount_dir
-- self.type = type
-- self.name = name
-+
-+ Filesystem = namedtuple("Filesystem", "mount_dir type name")
-+
- class mntent_struct(Structure):
- _fields_ = [("mnt_fsname", c_char_p), # Device or server for
- # filesystem.
-@@ -49,23 +54,21 @@ def _mounted_filesystems_from_getmnt() :
- if sys.platform == "cygwin":
- libc_name = "cygwin1.dll"
- else:
-- libc_name = util.find_library("c") or "/lib/libc.so.6" # fix for my Gentoo 4.0
-+ libc_name = (find_library("c") or
-+ find_library("/lib/libc.so.6")) # fix for Gentoo 4.0
-+
- libc = cdll.LoadLibrary(libc_name)
-+ libc.fopen.restype = c_void_p
-+ libc.getmntent.argtypes = libc.fclose.argtypes = [c_void_p]
- libc.getmntent.restype = POINTER(mntent_struct)
-- PyFile_AsFile = pythonapi.PyFile_AsFile
-- PyFile_AsFile.argtypes = [pythonapi.py_object]
-
-- try:
-- f = open("/proc/mounts")
-- except IOError:
-- try:
-- f = open("/etc/mtab")
-- except IOError:
-- raise IOError("Unable to open /proc/mounts nor /etc/mtab")
--
-- for entry in iter(lambda: libc.getmntent(PyFile_AsFile(f)), None):
-+ f = libc.fopen("/proc/mounts", "r") or libc.fopen("/etc/mtab", "r")
-+ if not f:
-+ raise IOError("Unable to open /proc/mounts nor /etc/mtab")
-+
-+ for entry in takewhile(bool, imap(libc.getmntent, repeat(f))):
- yield Filesystem(entry.contents.mnt_dir,
- entry.contents.mnt_type,
- entry.contents.mnt_fsname)
-
-- f.close()
-+ libc.fclose(f)
---
-2.5.0
-
diff --git a/sources b/sources
index 6320a05..da54632 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4e6217633e7d2ebfa4da2684c491562a trash-cli-798b71d.tar.gz
+SHA512 (trash-cli-0.16.12.26.tar.gz) = b92dd976b46636e3e94adcc21048c51f90f5149b22b48911cb1160e5b1c04a7d62b571c24cce89386de2eb5645b576277947dc74bc68a1dfa627f541b8c2ae46
diff --git a/trash-cli.spec b/trash-cli.spec
index 723592f..136c58f 100644
--- a/trash-cli.spec
+++ b/trash-cli.spec
@@ -1,20 +1,15 @@
-%global commit0 798b71dcb887828dee776c150a29c3c8b7387bf6
-%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
-
Summary: Command line interface to the freedesktop.org trashcan
Name: trash-cli
-Version: 0.12.9.14
-Release: 11git%{shortcommit0}%{?dist}
+Version: 0.16.12.26
+Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Base
URL : https://github.com/andreafrancia/trash-cli
-#Source0: http://pypi.python.org/packages/source/t/trash-cli/trash-cli-%{version}.tar.gz
-Source0: https://github.com/andreafrancia/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
-Patch0: 0001-Rely-on-Python-to-open-close-files.patch
-Patch1: 0002-Another-fix-that-does-not-depend-on-pythonapi.patch
+Source0: https://files.pythonhosted.org/packages/source/t/%{name}/%{name}-%{version}.tar.gz
BuildArch: noarch
-BuildRequires: python-setuptools dos2unix
-Requires: python-unipath python-setuptools
+BuildRequires: python2-setuptools dos2unix python2-devel
+BuildRequires: python2-nose
+Requires: python-unipath python2-setuptools
%description
trash-cli provides a command line trash usable with GNOME, KDE, Xfce or any
@@ -22,31 +17,29 @@ freedesktop.org compatible trash implementation. The command line interface is
compatible with rm and you can use trash-put as an alias to rm.
%prep
-%setup -q -n %{name}-%{shortcommit0}
-%patch0 -p1
-%patch1 -p1
+%autosetup -n %{name}-%{version}
%build
-%{__python} setup.py build
+%py2_build
%install
-%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+%py2_install
-# remove the testing part
-rm -fvr $RPM_BUILD_ROOT/%{python_sitelib}/unit_tests
-rm -fvr $RPM_BUILD_ROOT/%{python_sitelib}/integration_tests
+%check
+nosetests
%files
%doc README.rst
%{_bindir}/trash*
-#%{_bindir}/restore-trash
%{python_sitelib}/trashcli/
%{python_sitelib}/trash_cli-*-py*.egg-info
%{_mandir}/man1/trash-*
-#%{_mandir}/man1/restore-trash*
%changelog
+* Tue Dec 27 2016 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.16.12.26-1
+- Update to latest upstream version
+
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.9.14-11git798b71d
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-20 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-20 13:18 [rpms/trash-cli] pr6: Update to latest upstream version Ankur Sinha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox