From a6feb1859eb00105c10ab65c5a7fa69ee262f8c9 Mon Sep 17 00:00:00 2001 From: saltedcoffii <55339220+saltedcoffii@users.noreply.github.com> Date: Sun, 2 May 2021 13:59:12 -0400 Subject: [PATCH] pythonize thef*ck --- packages/py3_colorama.rb | 22 ++++++++++++++++++++++ packages/py3_decorator.rb | 22 ++++++++++++++++++++++ packages/py3_pyte.rb | 23 +++++++++++++++++++++++ packages/py3_wcwidth.rb | 22 ++++++++++++++++++++++ packages/thefuck.rb | 27 +++++++++++++++++---------- 5 files changed, 106 insertions(+), 10 deletions(-) create mode 100644 packages/py3_colorama.rb create mode 100644 packages/py3_decorator.rb create mode 100644 packages/py3_pyte.rb create mode 100644 packages/py3_wcwidth.rb diff --git a/packages/py3_colorama.rb b/packages/py3_colorama.rb new file mode 100644 index 000000000..fe260ed8d --- /dev/null +++ b/packages/py3_colorama.rb @@ -0,0 +1,22 @@ +require 'package' + +class Py3_colorama < Package + description 'Colorama makes ANSI color sequences work on MS Windows.' + homepage 'https://github.com/tartley/colorama/' + @_ver = '0.4.4' + version @_ver + license 'BSD-3' + compatibility 'all' + source_url 'https://github.com/tartley/colorama.git' + git_hashtag @_ver + + depends_on 'py3_setuptools' => :build + + def self.build + system "python3 setup.py build #{PY3_SETUP_BUILD_OPTIONS}" + end + + def self.install + system "python3 setup.py install #{PY_SETUP_INSTALL_OPTIONS}" + end +end diff --git a/packages/py3_decorator.rb b/packages/py3_decorator.rb new file mode 100644 index 000000000..46a9a048c --- /dev/null +++ b/packages/py3_decorator.rb @@ -0,0 +1,22 @@ +require 'package' + +class Py3_decorator < Package + description 'Colorama makes ANSI color sequences work on MS Windows.' + homepage 'https://github.com/micheles/decorator/' + @_ver = '4.4.2' + version @_ver + license 'BSD-2' + compatibility 'all' + source_url 'https://github.com/micheles/decorator.git' + git_hashtag @_ver + + depends_on 'py3_setuptools' => :build + + def self.build + system "python3 setup.py build #{PY3_SETUP_BUILD_OPTIONS}" + end + + def self.install + system "python3 setup.py install #{PY_SETUP_INSTALL_OPTIONS}" + end +end diff --git a/packages/py3_pyte.rb b/packages/py3_pyte.rb new file mode 100644 index 000000000..743a2cbc7 --- /dev/null +++ b/packages/py3_pyte.rb @@ -0,0 +1,23 @@ +require 'package' + +class Py3_pyte < Package + description 'PyTE is a Simple VTXXX-compatible terminal emulator.' + homepage 'https://github.com/selectel/pyte/' + @_ver = '0.8.0' + version @_ver + license 'LGPL-3' + compatibility 'all' + source_url 'https://github.com/selectel/pyte.git' + git_hashtag @_ver + + depends_on 'py3_wcwidth' + depends_on 'py3_setuptools' => :build + + def self.build + system "python3 setup.py build #{PY3_SETUP_BUILD_OPTIONS}" + end + + def self.install + system "python3 setup.py install #{PY_SETUP_INSTALL_OPTIONS}" + end +end diff --git a/packages/py3_wcwidth.rb b/packages/py3_wcwidth.rb new file mode 100644 index 000000000..bb4738a82 --- /dev/null +++ b/packages/py3_wcwidth.rb @@ -0,0 +1,22 @@ +require 'package' + +class Py3_wcwidth < Package + description 'WCWidth measures the displayed width of unicode strings in a terminal.' + homepage 'https://github.com/jquast/wcwidth/' + @_ver = '0.2.5' + version @_ver + license 'MIT' + compatibility 'all' + source_url 'https://github.com/jquast/wcwidth.git' + git_hashtag @_ver + + depends_on 'py3_setuptools' => :build + + def self.build + system "python3 setup.py build #{PY3_SETUP_BUILD_OPTIONS}" + end + + def self.install + system "python3 setup.py install #{PY_SETUP_INSTALL_OPTIONS}" + end +end diff --git a/packages/thefuck.rb b/packages/thefuck.rb index f0a9d2378..9784a091e 100644 --- a/packages/thefuck.rb +++ b/packages/thefuck.rb @@ -1,19 +1,26 @@ require 'package' class Thefuck < Package - description 'Magnificent app which corrects your previous console command.' - homepage 'https://github.com/nvbn/thefuck' - version '3.26' + description 'Thef*ck is a magnificent app which corrects your previous console command.' + homepage 'https://github.com/nvbn/thefuck/' + @_ver = '3.30' + version @_ver license 'MIT' compatibility 'all' - source_url 'https://raw.githubusercontent.com/nvbn/thefuck/3.26/README.md' - source_sha256 '105e10e37c4c1430fe6bc3a48c9508254048721825ae14856d713de61c95bc66' + source_url 'https://github.com/nvbn/thefuck.git' + git_hashtag @_ver + + depends_on 'py3_six' + depends_on 'py3_colorama' + depends_on 'py3_psutil' + depends_on 'py3_pyte' + depends_on 'py3_decorator' + + def self.build + system "python3 setup.py build #{PY3_SETUP_BUILD_OPTIONS}" + end def self.install - system "pip3 install thefuck --root #{CREW_DEST_DIR} --prefix #{CREW_PREFIX} --no-warn-script-location" - end - - def self.postinstall - system 'fuck && fuck' + system "python3 setup.py install #{PY_SETUP_INSTALL_OPTIONS}" end end