[arch-commits] Commit in (6 files)

Morten Linderud foxboron at archlinux.org
Sat Sep 8 23:46:52 UTC 2018


    Date: Saturday, September 8, 2018 @ 23:46:52
  Author: foxboron
Revision: 378832

addpkg: py3status 3.12-2

Added:
  py3status/
  py3status/repos/
  py3status/trunk/
  py3status/trunk/PKGBUILD
  py3status/trunk/fix_to_ascii.patch
Deleted:
  py3status/

--------------------+
 PKGBUILD           |   37 +++++++++++++++++++++++
 fix_to_ascii.patch |   81 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 118 insertions(+)

Added: py3status/trunk/PKGBUILD
===================================================================
--- py3status/trunk/PKGBUILD	                        (rev 0)
+++ py3status/trunk/PKGBUILD	2018-09-08 23:46:52 UTC (rev 378832)
@@ -0,0 +1,37 @@
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
+# Contributor: Alexis "Horgix" Chotard <alexis.horgix.chotard at gmail.com>
+# Contributor: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
+
+pkgname=py3status
+pkgver=3.12
+pkgrel=2
+pkgdesc="An extensible i3status replacement/wrapper written in python"
+url="http://www.ultrabug.fr/tag/py3status/"
+arch=('any')
+license=('BSD')
+depends=('python' 'python-setuptools' 'i3status')
+optdepends=('i3status: for some of the functionality'
+            'acpi: for some of the battery related modules'
+            'pacman-contrib: for the arch_updates module')
+source=($pkgname-$pkgver.tar.gz::"https://github.com/ultrabug/py3status/archive/$pkgver.tar.gz"
+        "fix_to_ascii.patch")
+sha256sums=('c85e10116be2c62ba0916c3cc2e2af75e7fb3c1c714f0690dbdadfcb3871c51f'
+            'bf3d79664e0f6974b52a84c386663969b6394fc1c5f4680f6eaae24a8b459de9')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p0 -i "$srcdir/fix_to_ascii.patch" setup.py
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python setup.py build
+}
+
+package() {
+  cd $pkgname-$pkgver
+  python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+  install -d "$pkgdir"/usr/share/doc/$pkgname
+  install -m644 doc/* README.rst CHANGELOG "$pkgdir"/usr/share/doc/$pkgname
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}

Added: py3status/trunk/fix_to_ascii.patch
===================================================================
--- py3status/trunk/fix_to_ascii.patch	                        (rev 0)
+++ py3status/trunk/fix_to_ascii.patch	2018-09-08 23:46:52 UTC (rev 378832)
@@ -0,0 +1,81 @@
+--- src/py3status-3.12/setup.py	2018-08-09 08:03:15.000000000 +0200
++++ src/py3status-3.12/setupnew.py	2018-08-30 01:48:06.579451985 +0200
+@@ -5,9 +5,6 @@
+ import os
+ import sys
+ from setuptools import find_packages, setup
+-from setuptools.command.develop import develop
+-from setuptools.command.install import install
+-from setuptools.command.easy_install import _to_ascii, ScriptWriter
+ 
+ module_path = os.path.join(
+     os.path.dirname(os.path.realpath(__file__)), 'py3status')
+@@ -16,50 +13,6 @@
+ sys.path.remove(module_path)
+ 
+ 
+-# setuptools causes scripts to run slowly see
+-# https://github.com/pypa/setuptools/issues/510
+-# We can make py3-cmd run much faster when installed via
+-# python setup install/develop
+-PY3_CMD_SCRIPT_TEXT = u"""{}
+-# -*- coding: utf-8 -*-
+-import re
+-import sys
+-
+-from py3status.command import send_command
+-
+-if __name__ == '__main__':
+-    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
+-    sys.exit(send_command())
+-"""
+-
+-
+-def install_py3_cmd(installer):
+-    """Attempt to overwrite /bin/py3-cmd with efficient version"""
+-    py_cmd = ScriptWriter.get_header()
+-    script_text = PY3_CMD_SCRIPT_TEXT.format(py_cmd)
+-    try:
+-        installer.write_script('py3-cmd', _to_ascii(script_text), 'b')
+-    except AttributeError:
+-        # building wheel etc
+-        pass
+-
+-
+-class PostDevelopCommand(develop):
+-    """Post-installation for develop"""
+-
+-    def run(self):
+-        develop.run(self)
+-        install_py3_cmd(self)
+-
+-
+-class PostInstallCommand(install):
+-    """Post-installation for install"""
+-
+-    def run(self):
+-        install.run(self)
+-        install_py3_cmd(self)
+-
+-
+ # Utility function to read the README file.
+ # Used for the long_description.  It's nice, because now 1) we have a top level
+ # README file and 2) it's easier to type in the README file than to put a raw
+@@ -83,10 +36,6 @@
+     packages=find_packages(),
+     include_package_data=True,
+     install_requires=[],
+-    cmdclass={
+-        'develop': PostDevelopCommand,
+-        'install': PostInstallCommand,
+-    },
+     entry_points={
+         'console_scripts': [
+             'py3status = py3status:main',
+@@ -105,5 +54,6 @@
+         'Programming Language :: Python :: 3.4',
+         'Programming Language :: Python :: 3.5',
+         'Programming Language :: Python :: 3.6',
++        'Programming Language :: Python :: 3.7',
+         'Topic :: Software Development :: Libraries :: Python Modules',
+     ], )



More information about the arch-commits mailing list