Hello community,

here is the log from the commit of package python-jupyter_core for 
openSUSE:Factory checked in at 2017-09-21 12:35:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter_core (Old)
 and      /work/SRC/openSUSE:Factory/.python-jupyter_core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jupyter_core"

Thu Sep 21 12:35:26 2017 rev:5 rq:527610 version:4.3.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-jupyter_core/python-jupyter_core-doc.changes  
    2017-05-17 17:14:08.508711414 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-jupyter_core.new/python-jupyter_core-doc.changes
 2017-09-21 12:36:31.733048701 +0200
@@ -1,0 +2,8 @@
+Wed Sep 20 17:53:24 UTC 2017 - [email protected]
+
+- Set configuration and data paths to be correct for any 
+  Linux distribution. This is done by using sed to replace
+  hard-coded values with those provided by rpm.
+  * Add use_rpms_paths.patch to make the paths easier to replace.
+
+-------------------------------------------------------------------
python-jupyter_core.changes: same change

New:
----
  use_rpms_paths.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-jupyter_core-doc.spec ++++++
--- /var/tmp/diff_new_pack.H9cccV/_old  2017-09-21 12:36:40.795773382 +0200
+++ /var/tmp/diff_new_pack.H9cccV/_new  2017-09-21 12:36:40.799772819 +0200
@@ -35,6 +35,8 @@
 Group:          Development/Languages/Python
 Url:            http://jupyter.org
 Source:         
https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE -- use_rpms_paths.patch -- change paths so they are easy 
to replace at build time
+Patch0:         use_rpms_paths.patch
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module jupyter_core}
@@ -64,6 +66,12 @@
 
 %prep
 %setup -q -n jupyter_core-%{version}
+%patch0 -p1
+# Set the appropriate paths dynamically
+sed -i "s|\"/usr/share/jupyter\"|\"%{_datadir}/jupyter\"|" 
jupyter_core/paths.py
+sed -i "s|\"/etc/jupyter\"|\"%{_sysconfdir}/jupyter\"|" jupyter_core/paths.py
+sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter')|" 
jupyter_core/paths.py
+sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter')|" 
jupyter_core/paths.py
 
 %build
 # Build the documentation

++++++ python-jupyter_core.spec ++++++
--- /var/tmp/diff_new_pack.H9cccV/_old  2017-09-21 12:36:40.827768880 +0200
+++ /var/tmp/diff_new_pack.H9cccV/_new  2017-09-21 12:36:40.827768880 +0200
@@ -25,6 +25,8 @@
 Group:          Development/Languages/Python
 Url:            http://jupyter.org
 Source:         
https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE -- use_rpms_paths.patch -- change paths so they are easy 
to replace at build time
+Patch0:         use_rpms_paths.patch
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module devel}
@@ -49,13 +51,25 @@
 
 %prep
 %setup -q -n jupyter_core-%{version}
+%patch0 -p1
+# Set the appropriate paths dynamically
+sed -i "s|\"/usr/share/jupyter\"|\"%{_datadir}/jupyter\"|" 
jupyter_core/paths.py
+sed -i "s|\"/etc/jupyter\"|\"%{_sysconfdir}/jupyter\"|" jupyter_core/paths.py
+sed -i "s|(sys\.prefix, 'share', 'jupyter')|('%{_datadir}', 'jupyter')|" 
jupyter_core/paths.py
+sed -i "s|(sys\.prefix, 'etc', 'jupyter')|('%{_sysconfdir}', 'jupyter')|" 
jupyter_core/paths.py
 
 %build
 %python_build
 
 %install
 %python_install
-%python_expand %fdupes %{buildroot}%{$python_sitelib}
+
+%{python_expand chmod a+x 
%{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py
+sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" 
%{buildroot}%{$python_sitelib}/jupyter_core/troubleshoot.py
+$python -m compileall -d %{$python_sitelib} 
%{buildroot}%{$python_sitelib}/jupyter_core/
+$python -O -m compileall -d %{$python_sitelib} 
%{buildroot}%{$python_sitelib}/jupyter_core/
+%fdupes %{buildroot}%{$python_sitelib}
+}
 
 # these directories are used by extensions
 mkdir -p %{buildroot}%{_datadir}/jupyter/

++++++ use_rpms_paths.patch ++++++
From: [email protected]
Date: 2017-09-20
Subject: Use rpm paths

Use single-line paths. These should be replaced with the appropriate
system paths in the .spec file.

---

--- a/jupyter_core/paths.py
+++ b/jupyter_core/paths.py
@@ -117,10 +117,7 @@
     else:  # PROGRAMDATA is not defined by default on XP.
         SYSTEM_JUPYTER_PATH = [os.path.join(sys.prefix, 'share', 'jupyter')]
 else:
-    SYSTEM_JUPYTER_PATH = [
-        "/usr/local/share/jupyter",
-        "/usr/share/jupyter",
-    ]
+    SYSTEM_JUPYTER_PATH = ["/usr/share/jupyter"]
 
 ENV_JUPYTER_PATH = [os.path.join(sys.prefix, 'share', 'jupyter')]
 
@@ -169,10 +166,7 @@
     else:  # PROGRAMDATA is not defined by default on XP.
         SYSTEM_CONFIG_PATH = []
 else:
-    SYSTEM_CONFIG_PATH = [
-        "/usr/local/etc/jupyter",
-        "/etc/jupyter",
-    ]
+    SYSTEM_CONFIG_PATH = ["/etc/jupyter"]
 
 ENV_CONFIG_PATH = [os.path.join(sys.prefix, 'etc', 'jupyter')]
 

Reply via email to