<pre style='margin:0'>
Cyril Roelandt (Steap) pushed a commit to branch master
in repository upt-macports.
</pre>
<p><a href="https://github.com/macports/upt-macports/commit/225eb1cb052866f7658419ed555b4e0dba748f14">https://github.com/macports/upt-macports/commit/225eb1cb052866f7658419ed555b4e0dba748f14</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 225eb1cb052866f7658419ed555b4e0dba748f14
</span>Author: Korusuke <karan.sheth@somaiya.edu>
AuthorDate: Thu May 9 03:11:39 2019 +0530
<span style='display:block; white-space:pre;color:#404040;'> Fix the pep8 issues, cleanup and modify class name
</span>---
setup.cfg | 2 +-
upt_macports/upt_macports.py | 24 ++++++------------------
2 files changed, 7 insertions(+), 19 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/setup.cfg b/setup.cfg
</span><span style='display:block; white-space:pre;color:#808080;'>index 5df0573..17c1183 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/setup.cfg
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/setup.cfg
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -23,7 +23,7 @@ include_package_data = true
</span>
[options.entry_points]
upt.backends =
<span style='display:block; white-space:pre;background:#ffe0e0;'>- macports = upt_macports.upt_macports:MacportsBackend
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macports = upt_macports.upt_macports:MacPortsBackend
</span>
[options.extras_require]
test =
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/upt_macports/upt_macports.py b/upt_macports/upt_macports.py
</span><span style='display:block; white-space:pre;color:#808080;'>index 1f5c68e..b5982c4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/upt_macports/upt_macports.py
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/upt_macports/upt_macports.py
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,21 +2,17 @@ import upt
</span> import logging
import jinja2
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> class MacPortsPackage(object):
def __init__(self):
self.logger = logging.getLogger('upt')
def create_package(self, upt_pkg, output):
self.upt_pkg = upt_pkg
<span style='display:block; white-space:pre;background:#ffe0e0;'>- #self._create_output_directories(upt_pkg, output)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #self._create_makefile()
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- #self._create_pkg_descr()
</span> self.logger.info(f'Hello, creating the package')
print(self._render_makefile_template())
print(self._depends)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # self.name, self.specifier
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> def _render_makefile_template(self):
env = jinja2.Environment(
loader=jinja2.PackageLoader('upt_macports', 'templates'),
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,6 +39,7 @@ class MacPortsPackage(object):
</span> def test_depends(self):
return self._depends('test')
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> class MacPortsPythonPackage(MacPortsPackage):
template = 'python.Portfile'
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -55,17 +52,6 @@ class MacPortsPythonPackage(MacPortsPackage):
</span> name = name.lower()
return f'py-{name}'
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# if name == 'py':
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# return 'py-py'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# if name.startswith('python-'):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# name = name[7:]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# elif name.startswith('py-'):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# name = name[3:]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# elif name.startswith('py'):
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# name = name[2:]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# return f'py-{name}'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span>
class MacPortsNpmPackage(MacPortsPackage):
template = 'npm.Portfile'
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -79,6 +65,7 @@ class MacPortsNpmPackage(MacPortsPackage):
</span> name = name.lower()
return f'{name}'
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> class MacPortsPerlPackage(MacPortsPackage):
template = 'perl.Portfile'
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -88,13 +75,14 @@ class MacPortsPerlPackage(MacPortsPackage):
</span>
@staticmethod
def _normalized_macports_name(name):
<span style='display:block; white-space:pre;background:#ffe0e0;'>- name = name # for perl changing to lower case may cause error
</span> return name
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> class MacPortsRubyPackage(MacPortsPackage):
template = 'ruby.Portfile'
<span style='display:block; white-space:pre;background:#ffe0e0;'>-class MacportsBackend(upt.Backend):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+class MacPortsBackend(upt.Backend):
</span> name = 'macports'
def create_package(self, upt_pkg, output=None):
</pre><pre style='margin:0'>
</pre>