Hello community, here is the log from the commit of package mypy for openSUSE:Factory checked in at 2018-08-29 12:26:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mypy (Old) and /work/SRC/openSUSE:Factory/.mypy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mypy" Wed Aug 29 12:26:18 2018 rev:9 rq:631910 version:0.620 Changes: -------- --- /work/SRC/openSUSE:Factory/mypy/mypy.changes 2018-08-28 09:24:27.772831465 +0200 +++ /work/SRC/openSUSE:Factory/.mypy.new/mypy.changes 2018-08-29 12:26:20.511546369 +0200 @@ -1,0 +2,9 @@ +Tue Aug 28 07:41:53 UTC 2018 - [email protected] + +- desinglespec - is app and only for python3 +- add RH patchset: + 0001-Look-for-typeshed-in-usr-share.patch + 0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch + 0003-Pass-executable-path-into-main-when-running-installe.patch + +------------------------------------------------------------------- New: ---- 0001-Look-for-typeshed-in-usr-share.patch 0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch 0003-Pass-executable-path-into-main-when-running-installe.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mypy.spec ++++++ --- /var/tmp/diff_new_pack.fQth9x/_old 2018-08-29 12:26:21.075547605 +0200 +++ /var/tmp/diff_new_pack.fQth9x/_new 2018-08-29 12:26:21.079547613 +0200 @@ -16,8 +16,6 @@ # -%define skip_python2 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: mypy Version: 0.620 Release: 0 @@ -26,18 +24,22 @@ Group: Development/Languages/Python URL: http://www.mypy-lang.org/ Source: https://files.pythonhosted.org/packages/source/m/mypy/mypy-%{version}.tar.gz -BuildRequires: %{python_module setuptools} +Patch0: 0001-Look-for-typeshed-in-usr-share.patch +Patch1: 0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch +Patch2: 0003-Pass-executable-path-into-main-when-running-installe.patch BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-mypy_extensions >= 0.4.0 -Requires: python-typed-ast >= 1.1.0 -Provides: mypy +BuildRequires: python3-setuptools +Requires: python3-mypy_extensions >= 0.4.0 +Requires: python3-psutil >= 5.4.0 +Requires: python3-typed-ast >= 1.1.0 BuildArch: noarch +Provides: python3-mypy = %{version} +Obsoletes: python3-mypy < %{version} # SECTION docs -BuildRequires: %{python_module Sphinx >= 1.4.4} -BuildRequires: %{python_module sphinx_rtd_theme >= 0.1.9} +BuildRequires: python3-Sphinx >= 1.4.4 +BuildRequires: python3-sphinx_rtd_theme >= 0.1.9 # /SECTION -%python_subpackages %description Mypy is an optional static type checker for Python that aims to @@ -51,24 +53,23 @@ and union types. %prep -%setup -q -n mypy-%{version} +%autosetup -n mypy-%{version} -p1 %build -rm -r typeshed/tests/ -%python_build +%python3_build pushd docs make %{?_smp_mflags} html rm build/html/.buildinfo popd %install -%python_install -%python_expand %fdupes %{buildroot} +%python3_install +%fdupes %{buildroot} -%files %{python_files} +%files %doc docs/README.md docs/build/html/ %license LICENSE -%{python_sitelib}/* +%{python3_sitelib}/* %{_bindir}/dmypy %{_bindir}/mypy %{_bindir}/stubgen ++++++ 0001-Look-for-typeshed-in-usr-share.patch ++++++ >From 980a17c29d73a161e46f6b3c0faf1a8520427d12 Mon Sep 17 00:00:00 2001 From: David Shea <[email protected]> Date: Tue, 15 Dec 2015 14:01:55 -0500 Subject: [PATCH 1/3] Look for typeshed in /usr/share Skip installing the bundled typeshed --- mypy/build.py | 2 +- setup.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mypy/build.py b/mypy/build.py index 471f819f..8b050ae9 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -245,7 +245,7 @@ def default_data_dir(bin_dir: Optional[str]) -> str: return dir elif base == 'bin': # Installed to somewhere (can be under /usr/local or anywhere). - return os.path.join(dir, 'lib', 'mypy') + return os.path.join(dir, 'share') elif base == 'python3': # Assume we installed python3 with brew on os x return os.path.join(os.path.dirname(dir), 'lib', 'mypy') diff --git a/setup.py b/setup.py index 77c3a3b8..fe7c7e5a 100644 --- a/setup.py +++ b/setup.py @@ -73,8 +73,6 @@ class CustomPythonBuild(build_py): data_files = [] -data_files += find_data_files('typeshed', ['*.py', '*.pyi']) - data_files += find_data_files('xml', ['*.xsd', '*.xslt', '*.css']) classifiers = [ -- 2.13.5 ++++++ 0002-Canonicalize-bin_dir-when-looking-for-data_dir.patch ++++++ >From 8c93a55e9053f8c35a995514e063c7bab57aa354 Mon Sep 17 00:00:00 2001 From: David Shea <[email protected]> Date: Thu, 7 Jan 2016 10:02:27 -0500 Subject: [PATCH 2/3] Canonicalize bin_dir when looking for data_dir. This way calling mypy as /bin/mypy will look for the data dir starting in /usr instead of /. --- mypy/build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mypy/build.py b/mypy/build.py index 8b050ae9..cc99dcf9 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -234,6 +234,10 @@ def default_data_dir(bin_dir: Optional[str]) -> str: return subdir # Default to directory containing this file's parent. return parent + + # Canonicalize the path in case bin_dir is a symlink + bin_dir = os.path.realpath(bin_dir) + base = os.path.basename(bin_dir) dir = os.path.dirname(bin_dir) if (sys.platform == 'win32' and base.lower() == 'scripts' -- 2.13.5 ++++++ 0003-Pass-executable-path-into-main-when-running-installe.patch ++++++ >From 3ee8d60caa5e6480c81f8d47423679cc0e7ba8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20K=C3=BCmmerlin?= <[email protected]> Date: Mon, 21 Aug 2017 22:22:49 +0200 Subject: [PATCH 3/3] Pass executable path into main() when running installed script --- mypy/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mypy/__main__.py b/mypy/__main__.py index 625242d1..f4ac9511 100644 --- a/mypy/__main__.py +++ b/mypy/__main__.py @@ -1,10 +1,11 @@ """Mypy type checker command line tool.""" from mypy.main import main +import sys def console_entry() -> None: - main(None) + main(sys.argv[0]) if __name__ == '__main__': -- 2.13.5
