فهرست منبع

add dependencies for Tensorflow

Ralf S. Engelschall 8 سال پیش
والد
کامیت
9c9f34c4f8
2فایلهای تغییر یافته به همراه40 افزوده شده و 1 حذف شده
  1. 11 0
      python-setup/python-setup.patch
  2. 29 1
      python-setup/python-setup.spec

+ 11 - 0
python-setup/python-setup.patch

@@ -10,3 +10,14 @@ Index: setuptools-32.1.0/setup.py
  )
  
  force_windows_specific_files = (
+Index: dev-0.4.0/dev/__init__.py
+--- dev-0.4.0/dev/__init__.py.orig	2012-08-21 07:33:32.000000000 +0200
++++ dev-0.4.0/dev/__init__.py	2017-06-10 16:38:15.612178000 +0200
+@@ -1,6 +1,6 @@
+ """
+ 
+-🚧 About
++About
+ --------
+ 
+ dev is a collection of Python developer tools presented as a

+ 29 - 1
python-setup/python-setup.spec

@@ -30,6 +30,8 @@
 %define       V_pbr            3.0.1
 %define       V_cython         0.25.2
 %define       V_incremental    17.5.0
+%define       V_dev            0.4.0
+%define       V_wheel          0.30.0a0
 
 #   package information
 Name:         python-setup
@@ -42,7 +44,7 @@ Class:        EVAL
 Group:        Language
 License:      PSF/ZPL
 Version:      %{V_python}
-Release:      20170524
+Release:      20170610
 
 #   list of sources
 Source0:      https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{V_setuptools}.tar.gz
@@ -52,6 +54,8 @@ Source3:      https://files.pythonhosted.org/packages/source/C/Cython/Cython-%{V
 Source4:      https://files.pythonhosted.org/packages/source/s/setuptools-git/setuptools-git-%{V_setuptools_git}.tar.gz
 Source5:      https://files.pythonhosted.org/packages/source/s/setuptools_scm/setuptools_scm-%{V_setuptools_scm}.tar.gz
 Source6:      https://files.pythonhosted.org/packages/source/i/incremental/incremental-%{V_incremental}.tar.gz
+Source7:      https://files.pythonhosted.org/packages/source/d/dev/dev-%{V_dev}.tar.gz
+Source8:      https://files.pythonhosted.org/packages/source/w/wheel/wheel-%{V_wheel}.tar.gz
 Patch0:       python-setup.patch
 
 #   build information
@@ -97,6 +101,16 @@ PreReq:       OpenPKG, openpkg >= 20160101, python >= %{V_python}
         url       = http://pypi.python.org/pypi/incremental/
         regex     = incremental-(__VER__)\.tar\.gz
     }
+    prog python-setup:dev = {
+        version   = %{V_dev}
+        url       = http://pypi.python.org/pypi/dev/
+        regex     = dev-(__VER__)\.tar\.gz
+    }
+    prog python-setup:wheel = {
+        version   = %{V_wheel}
+        url       = http://pypi.python.org/pypi/wheel/
+        regex     = wheel-(__VER__)\.tar\.gz
+    }
 
 %prep
     %setup -q -c
@@ -106,6 +120,8 @@ PreReq:       OpenPKG, openpkg >= 20160101, python >= %{V_python}
     %setup -q -T -D -a 4
     %setup -q -T -D -a 5
     %setup -q -T -D -a 6
+    %setup -q -T -D -a 7
+    %setup -q -T -D -a 8
     %patch -p0
 
 %build
@@ -158,6 +174,18 @@ PreReq:       OpenPKG, openpkg >= 20160101, python >= %{V_python}
             --root=$RPM_BUILD_ROOT \
             --prefix=%{l_prefix}
     ) || exit $?
+    (   cd dev-%{V_dev}
+        PYTHONPATH=$RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages \
+        %{l_prefix}/bin/python setup.py install \
+            --root=$RPM_BUILD_ROOT \
+            --prefix=%{l_prefix}
+    ) || exit $?
+    (   cd wheel-%{V_wheel}
+        PYTHONPATH=$RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages \
+        %{l_prefix}/bin/python setup.py install \
+            --root=$RPM_BUILD_ROOT \
+            --prefix=%{l_prefix}
+    ) || exit $?
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
 
 %files -f files