Browse code

Adding python packages for sphinx along with new tests

Change-Id: Ibc729641d895b61cc0b3abd55e0dbdcf56ad21d7
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2560
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>

DheerajSShetty authored on 2017/04/29 07:54:00
Showing 12 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,69 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Name:           python-alabaster
4
+Version:        0.7.10
5
+Release:        1%{?dist}
6
+Summary:        A configurable sidebar-enabled Sphinx theme
7
+License:        BSD
8
+Group:          Development/Languages/Python
9
+Url:            https://github.com/bitprophet/alabaster/
10
+Vendor:		VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/d0/a5/e3a9ad3ee86aceeff71908ae562580643b955ea1b1d4f08ed6f7e8396bd7/alabaster-%{version}.tar.gz
13
+%define sha1    alabaster=dba599faf1ca5541ef35ab251eb2b365ae2f25c7
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python2-libs
18
+BuildRequires:  python-setuptools
19
+Requires:       python2
20
+Requires:       python2-libs
21
+
22
+BuildArch:      noarch
23
+
24
+%description
25
+Alabaster is a visually (c)lean, responsive, configurable theme for the Sphinx documentation system. It is Python 2+3 compatible.
26
+
27
+%package -n     python3-alabaster
28
+Summary:        A configurable sidebar-enabled Sphinx theme
29
+BuildRequires:  python3
30
+BuildRequires:  python3-devel
31
+Requires:       python3
32
+Requires:       python3-libs
33
+
34
+%description -n python3-alabaster
35
+
36
+Python 3 version.
37
+
38
+%prep
39
+%setup -n alabaster-%{version}
40
+rm -rf ../p3dir
41
+cp -a . ../p3dir
42
+
43
+%build
44
+python2 setup.py build
45
+pushd ../p3dir
46
+python3 setup.py build
47
+popd
48
+
49
+%install
50
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
51
+pushd ../p3dir
52
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
53
+popd
54
+
55
+%check
56
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
57
+
58
+%files
59
+%defattr(-,root,root,-)
60
+%{python_sitelib}/*
61
+
62
+%files -n python3-alabaster
63
+%defattr(-,root,root,-)
64
+%{python3_sitelib}/*
65
+
66
+%changelog
67
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.7.10-1
68
+-   Initial
0 69
new file mode 100644
... ...
@@ -0,0 +1,83 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Name:           python-babel
4
+Version:        2.4.0
5
+Release:        1%{?dist}
6
+Summary:        an integrated collection of utilities that assist in internationalizing and localizing Python applications
7
+License:        BSD3
8
+Group:          Development/Languages/Python
9
+Url:            http://babel.pocoo.org
10
+Vendor:		VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/92/22/643f3b75f75e0220c5ef9f5b72b619ccffe9266170143a4821d4885198de/Babel-%{version}.tar.gz
13
+%define sha1    Babel=c3b247d17a34dc600c93f93f8f533029430bccb4
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python2-libs
18
+BuildRequires:  python-setuptools
19
+BuildRequires:  python-pytz
20
+BuildRequires:  python-pytest
21
+Requires:       python2
22
+Requires:       python2-libs
23
+Requires:       python-pytz
24
+BuildArch:      noarch
25
+
26
+%description
27
+Babel is an integrated collection of utilities that assist in internationalizing and localizing Python applications,
28
+with an emphasis on web-based applications.
29
+
30
+The functionality Babel provides for internationalization (I18n) and localization (L10N) can be separated into two different aspects:
31
+1.Tools to build and work with gettext message catalogs.
32
+2.A Python interface to the CLDR (Common Locale Data Repository), providing access to various locale display names, localized number and date formatting, etc.
33
+
34
+%package -n     python3-babel
35
+Summary:        an integrated collection of utilities that assist in internationalizing and localizing Python applications
36
+BuildRequires:  python3
37
+BuildRequires:  python3-devel
38
+BuildRequires:  python3-pytz
39
+BuildRequires:  python3-pytest
40
+Requires:       python3
41
+Requires:       python3-libs
42
+Requires:       python3-pytz
43
+
44
+%description -n python3-babel
45
+
46
+Python 3 version.
47
+
48
+%prep
49
+%setup -n Babel-%{version}
50
+rm -rf ../p3dir
51
+cp -a . ../p3dir
52
+
53
+%build
54
+python2 setup.py build
55
+pushd ../p3dir
56
+python3 setup.py build
57
+popd
58
+
59
+%install
60
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
61
+pushd ../p3dir
62
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
63
+popd
64
+
65
+%check
66
+python2 setup.py test
67
+pushd ../p3dir
68
+python3 setup.py test
69
+popd
70
+
71
+%files
72
+%defattr(-,root,root,-)
73
+%{python_sitelib}/*
74
+
75
+%files -n python3-babel
76
+%defattr(-,root,root,-)
77
+%{_bindir}/pybabel
78
+%{python3_sitelib}/*
79
+
80
+%changelog
81
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.4.0-1
82
+-   Initial
0 83
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+
2
+Name:           python-enum34
3
+Version:        1.1.6
4
+Release:        1%{?dist}
5
+Summary:        Robust enumerated type support in Python
6
+License:        BSD
7
+Group:          Development/Libraries
8
+Url:            https://bitbucket.org/stoneleaf/enum34
9
+Vendor:		VMware, Inc.
10
+Distribution: 	Photon
11
+Source0:        https://pypi.python.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-%{version}.tar.gz
12
+%define sha1    enum34=014ef5878333ff91099893d615192c8cd0b1525a
13
+
14
+BuildRequires:  python2
15
+BuildRequires:  python2-libs
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python-setuptools
18
+
19
+Requires:       python2
20
+Requires:       python2-libs
21
+
22
+BuildArch:      noarch
23
+
24
+%description
25
+An enumeration is a set of symbolic names (members) bound to unique, constant values. Within an enumeration, the members can be compared by identity, and the enumeration itself can be iterated over. 
26
+
27
+%prep
28
+%setup -n enum34-%{version}
29
+
30
+%build
31
+python setup.py build
32
+
33
+%install
34
+python setup.py install --prefix=%{_prefix} --root=%{buildroot}
35
+
36
+%check
37
+PATH=%{buildroot}%{_bindir}:${PATH} \
38
+PYTHONPATH=%{buildroot}%{python_sitelib} \
39
+ python enum/test.py
40
+
41
+%files
42
+%defattr(-,root,root,-)
43
+%{python_sitelib}/*
44
+
45
+%changelog
46
+*   Wed Apr 26 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.1.6-1
47
+-   Initial packaging for Photon
0 48
new file mode 100644
... ...
@@ -0,0 +1,74 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Name:           python-hypothesis
4
+Version:        3.8.2
5
+Release:        1%{?dist}
6
+Summary:        Python library for creating unit tests which are simpler to write and more powerful
7
+License:        MPLv2.0
8
+Group:          Development/Languages/Python
9
+Url:            https://github.com/HypothesisWorks/hypothesis-python
10
+Vendor:		VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/cf/d5/b3d491e4b5094be0ef69b910d637096c8e23f84a9bdc4eba0b869220d1f0/hypothesis-%{version}.tar.gz
13
+%define sha1    hypothesis=7416346ebd8ae6f78f482980f80a57764913e27f
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python2-libs
18
+BuildRequires:  python-setuptools
19
+BuildRequires:  python-enum34
20
+
21
+Requires:       python2
22
+Requires:       python2-libs
23
+Requires:       python-enum34
24
+
25
+BuildArch:      noarch
26
+
27
+%description
28
+Hypothesis is an advanced testing library for Python. It lets you write tests which are parametrized by a source of examples,
29
+and then generates simple and comprehensible examples that make your tests fail. This lets you find more bugs in your code with less work
30
+
31
+%package -n     python3-hypothesis
32
+Summary:        Python library for creating unit tests which are simpler to write and more powerful
33
+BuildRequires:  python3
34
+BuildRequires:  python3-devel
35
+
36
+Requires:       python3
37
+Requires:       python3-libs
38
+
39
+%description -n python3-hypothesis
40
+
41
+Python 3 version.
42
+
43
+%prep
44
+%setup -n hypothesis-%{version}
45
+rm -rf ../p3dir
46
+cp -a . ../p3dir
47
+
48
+%build
49
+python2 setup.py build
50
+pushd ../p3dir
51
+python3 setup.py build
52
+popd
53
+
54
+%install
55
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
56
+pushd ../p3dir
57
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
58
+popd
59
+
60
+%check
61
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
62
+
63
+%files
64
+%defattr(-,root,root,-)
65
+%{python_sitelib}/*
66
+
67
+%files -n python3-hypothesis
68
+%defattr(-,root,root,-)
69
+%{python3_sitelib}/*
70
+
71
+%changelog
72
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.8.2-1
73
+-   Initial
0 74
new file mode 100644
... ...
@@ -0,0 +1,72 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Name:           python-imagesize
4
+Version:        0.7.1
5
+Release:        1%{?dist}
6
+Summary:        python module to analyze jpeg/jpeg2000/png/gif image header and return image size.
7
+License:        MIT
8
+Group:          Development/Languages/Python
9
+Url:            https://github.com/shibukawa/imagesize_py
10
+Vendor:		VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/53/72/6c6f1e787d9cab2cc733cf042f125abec07209a58308831c9f292504e826/imagesize_py-%{version}.tar.gz
13
+%define sha1    imagesize_py=b0ae3151495d8bbb207170bff7ed253d929e0dce
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python2-libs
18
+BuildRequires:  python-setuptools
19
+BuildRequires:  python-pytest
20
+Requires:       python2
21
+Requires:       python2-libs
22
+
23
+BuildArch:      noarch
24
+
25
+%description
26
+python module to analyze jpeg/jpeg2000/png/gif image header and return image size.
27
+
28
+%package -n     python3-imagesize
29
+Summary:        python module to analyze jpeg/jpeg2000/png/gif image header and return image size.
30
+BuildRequires:  python3
31
+BuildRequires:  python3-devel
32
+BuildRequires:  python3-pytest
33
+Requires:       python3
34
+Requires:       python3-libs
35
+
36
+%description -n python3-imagesize
37
+
38
+Python 3 version.
39
+
40
+%prep
41
+%setup -n imagesize_py-%{version}
42
+rm -rf ../p3dir
43
+cp -a . ../p3dir
44
+
45
+%build
46
+python2 setup.py build
47
+pushd ../p3dir
48
+python3 setup.py build
49
+popd
50
+
51
+%install
52
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
53
+pushd ../p3dir
54
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
55
+popd
56
+
57
+%check
58
+py.test-2
59
+py.test-3
60
+
61
+%files
62
+%defattr(-,root,root,-)
63
+%{python_sitelib}/*
64
+
65
+%files -n python3-imagesize
66
+%defattr(-,root,root,-)
67
+%{python3_sitelib}/*
68
+
69
+%changelog
70
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.7.1-1
71
+-   Initial
... ...
@@ -1,6 +1,9 @@
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
3
+
1 4
 Name:           python-jinja2
2 5
 Version:        2.9.5
3
-Release:        2%{?dist}
6
+Release:        3%{?dist}
4 7
 Url:            http://jinja.pocoo.org/
5 8
 Summary:        A fast and easy to use template engine written in pure Python
6 9
 License:        BSD
... ...
@@ -12,9 +15,10 @@ Source0:        https://pypi.python.org/packages/71/59/d7423bd5e7ddaf3a1ce299ab4
12 12
 BuildRequires:  python2
13 13
 BuildRequires:  python2-libs
14 14
 BuildRequires:  python-setuptools
15
-
15
+BuildRequires:  python-markupsafe
16 16
 Requires:       python2
17 17
 Requires:       python2-libs
18
+Requires:       python-markupsafe
18 19
 BuildArch:      noarch
19 20
 
20 21
 %description
... ...
@@ -22,15 +26,37 @@ Jinja2 is a template engine written in pure Python.  It provides a Django
22 22
 inspired non-XML syntax but supports inline expressions and an optional
23 23
 sandboxed environment.
24 24
 
25
+%package -n     python3-jinja2
26
+Summary:        A fast and easy to use template engine written in pure Python
27
+BuildRequires:  python3
28
+BuildRequires:  python3-devel
29
+BuildRequires:  python3-markupsafe
30
+Requires:       python3
31
+Requires:       python3-libs
32
+Requires:       python3-markupsafe
33
+
34
+%description -n python3-jinja2
35
+
36
+Python 3 version.
37
+
25 38
 %prep
26 39
 %setup -q -n Jinja2-%{version}
40
+rm -rf ../p3dir
41
+cp -a . ../p3dir
27 42
 
28 43
 %build
29 44
 python setup.py build
30 45
 sed -i 's/\r$//' LICENSE # Fix wrong EOL encoding
46
+pushd ../p3dir
47
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
48
+sed -i 's/\r$//' LICENSE # Fix wrong EOL encoding
49
+popd
31 50
 
32 51
 %install
33 52
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
53
+pushd ../p3dir
54
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
55
+popd
34 56
 
35 57
 %check
36 58
 make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
... ...
@@ -43,7 +69,17 @@ make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
43 43
 %exclude %{python_sitelib}/*/*.py
44 44
 %{python_sitelib}/Jinja2-%{version}-py%{python_version}.egg-info
45 45
 
46
+%files -n python3-jinja2
47
+%defattr(-,root,root)
48
+%doc AUTHORS CHANGES
49
+%license LICENSE
50
+%{python3_sitelib}/jinja2
51
+%exclude %{python3_sitelib}/*/*.py
52
+%{python3_sitelib}/Jinja2-%{version}-py%{python3_version}.egg-info
53
+
46 54
 %changelog
55
+*   Wed Apr 26 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.9.5-3
56
+-   BuildRequires python-markupsafe , creating subpackage python3-jinja2
47 57
 *   Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.9.5-2
48 58
 -   Fix arch
49 59
 *   Mon Mar 27 2017 Sarah Choi <sarahc@vmware.com> 2.9.5-1
50 60
new file mode 100644
... ...
@@ -0,0 +1,76 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Name:           python-py
4
+Version:        1.4.33
5
+Release:        1%{?dist}
6
+Summary:        Python development support library
7
+License:        MIT
8
+Group:          Development/Languages/Python
9
+Url:            https://github.com/pytest-dev/py
10
+Vendor:		VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/53/72/6c6f1e787d9cab2cc733cf042f125abec07209a58308831c9f292504e826/py-%{version}.tar.gz
13
+%define sha1    py=4ac8bacefc2583cd7ba488b5cdbfa1e0d469e792
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python2-libs
18
+BuildRequires:  python-setuptools
19
+Requires:       python2
20
+Requires:       python2-libs
21
+
22
+BuildArch:      noarch
23
+
24
+%description
25
+The py lib is a Python development support library featuring the following tools and modules:
26
+
27
+py.path: uniform local and svn path objects
28
+py.apipkg: explicit API control and lazy-importing
29
+py.iniconfig: easy parsing of .ini files
30
+py.code: dynamic code generation and introspection
31
+
32
+%package -n     python3-py
33
+Summary:        Python development support library
34
+BuildRequires:  python3
35
+BuildRequires:  python3-devel
36
+
37
+Requires:       python3
38
+Requires:       python3-libs
39
+
40
+%description -n python3-py
41
+
42
+Python 3 version.
43
+
44
+%prep
45
+%setup -n py-%{version}
46
+rm -rf ../p3dir
47
+cp -a . ../p3dir
48
+
49
+%build
50
+python2 setup.py build
51
+pushd ../p3dir
52
+python3 setup.py build
53
+popd
54
+
55
+%install
56
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
57
+pushd ../p3dir
58
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
59
+popd
60
+
61
+%check
62
+#python-py and python-pytest have circular dependency. Hence not adding tests
63
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
64
+
65
+%files
66
+%defattr(-,root,root,-)
67
+%{python_sitelib}/*
68
+
69
+%files -n python3-py
70
+%defattr(-,root,root,-)
71
+%{python3_sitelib}/*
72
+
73
+%changelog
74
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.4.33-1
75
+-   Initial
0 76
new file mode 100644
... ...
@@ -0,0 +1,100 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+%{!?python2_version: %define python2_version %(python2 -c "import sys; sys.stdout.write(sys.version[:3])")}
3
+%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
4
+
5
+Name:           python-pytest
6
+Version:        3.0.7
7
+Release:        1%{?dist}
8
+Summary:        pytest is a mature full-featured Python testing tool that helps you write better programs
9
+License:        MIT
10
+Group:          Development/Languages/Python
11
+Url:            https://docs.pytest.org
12
+Vendor:		VMware, Inc.
13
+Distribution:   Photon
14
+Source0:        https://pypi.python.org/packages/00/e9/f77dcd80bdb2e52760f38dbd904016da018ab4373898945da744e5e892e9/pytest-%{version}.tar.gz
15
+%define sha1    pytest=16bba5707c14d0ffffe92cba2380cf3bdc227068
16
+
17
+BuildRequires:  python2
18
+BuildRequires:  python2-devel
19
+BuildRequires:  python2-libs
20
+BuildRequires:  python-setuptools
21
+BuildRequires:  python-py
22
+BuildRequires:  python-xml
23
+BuildRequires:  python-hypothesis
24
+BuildRequires:  python-Twisted
25
+Requires:       python2
26
+Requires:       python2-libs
27
+Requires:       python-py
28
+
29
+BuildArch:      noarch
30
+
31
+%description
32
+pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries.
33
+
34
+%package -n     python3-pytest
35
+Summary:        pytest is a mature full-featured Python testing tool that helps you write better programs
36
+BuildRequires:  python3
37
+BuildRequires:  python3-devel
38
+BuildRequires:  python3-py
39
+BuildRequires:  python3-hypothesis
40
+BuildRequires:  python3-Twisted
41
+
42
+Requires:       python3
43
+Requires:       python3-libs
44
+Requires:       python3-py
45
+
46
+%description -n python3-pytest
47
+
48
+Python 3 version.
49
+
50
+%prep
51
+%setup -n pytest-%{version}
52
+rm -rf ../p3dir
53
+cp -a . ../p3dir
54
+
55
+%build
56
+python2 setup.py build
57
+pushd ../p3dir
58
+python3 setup.py build
59
+popd
60
+
61
+%install
62
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
63
+
64
+mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python2_version}
65
+ln -snf pytest-%{python2_version} %{buildroot}%{_bindir}/pytest-2
66
+mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python2_version}
67
+ln -snf py.test-%{python2_version} %{buildroot}%{_bindir}/py.test-2
68
+
69
+
70
+pushd ../p3dir
71
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
72
+mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python3_version}
73
+ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest-3
74
+mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python3_version}
75
+ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test-3
76
+popd
77
+
78
+%check
79
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
80
+
81
+%files
82
+%defattr(-,root,root,-)
83
+%{_bindir}/pytest-2
84
+%{_bindir}/pytest-%{python2_version}
85
+%{_bindir}/py.test-2
86
+%{_bindir}/py.test-%{python2_version}
87
+%{python_sitelib}/*
88
+
89
+%files -n python3-pytest
90
+%defattr(-,root,root,-)
91
+%{_bindir}/pytest-3
92
+%{_bindir}/pytest-%{python3_version}
93
+%{_bindir}/py.test-3
94
+%{_bindir}/py.test-%{python3_version}
95
+%{python3_sitelib}/*
96
+
97
+%changelog
98
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.0.7-1
99
+-   Initial
... ...
@@ -1,10 +1,12 @@
1 1
 %{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2 2
 %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
3
+%{!?python2_version: %define python2_version %(python2 -c "import sys; sys.stdout.write(sys.version[:3])")}
4
+%{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
3 5
 
4 6
 Summary:        World timezone definitions, modern and historical
5 7
 Name:           python-pytz
6 8
 Version:        2017.2
7
-Release:        1%{?dist}
9
+Release:        2%{?dist}
8 10
 Url:            https://pypi.python.org/pypi/pytz
9 11
 License:        MIT
10 12
 Group:          Development/Languages/Python
... ...
@@ -19,8 +21,10 @@ BuildRequires:  python2-libs
19 19
 BuildRequires:  python2-devel
20 20
 BuildRequires:  python-setuptools
21 21
 BuildRequires:  unzip
22
+BuildRequires:  python-pytest
22 23
 Requires:       python2
23 24
 Requires:       python2-libs
25
+Requires:       tzdata
24 26
 
25 27
 %description
26 28
 pytz brings the Olson tz database into Python. This library allows
... ...
@@ -34,8 +38,10 @@ Summary:        python-pytz
34 34
 BuildRequires:  python3
35 35
 BuildRequires:  python3-devel
36 36
 BuildRequires:  python3-libs
37
+BuildRequires:  python3-pytest
37 38
 Requires:       python3
38 39
 Requires:       python3-libs
40
+Requires:       tzdata
39 41
 
40 42
 %description -n python3-pytz
41 43
 Python 3 version.
... ...
@@ -58,9 +64,13 @@ python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
58 58
 popd
59 59
 
60 60
 %check
61
-python2 setup.py test
61
+PATH=%{buildroot}%{_bindir}:${PATH} \
62
+PYTHONPATH=%{buildroot}%{python2_sitelib} \
63
+    py.test-%{python2_version} -v
62 64
 pushd ../p3dir
63
-python3 setup.py test
65
+PATH=%{buildroot}%{_bindir}:${PATH} \
66
+PYTHONPATH=%{buildroot}%{python3_sitelib} \
67
+    py.test-%{python3_version} -v
64 68
 popd
65 69
 
66 70
 %files
... ...
@@ -72,5 +82,7 @@ popd
72 72
 %{python3_sitelib}/*
73 73
 
74 74
 %changelog
75
+*   Wed Apr 26 2017 Dheeraj Shetty <dheerajs@vmware.com> 2017.2-2
76
+-   Requires tzdata
75 77
 *   Tue Apr 11 2017 Xiaolin Li <xiaolinl@vmware.com> 2017.2-1
76 78
 -   Initial packaging for Photon
77 79
new file mode 100644
... ...
@@ -0,0 +1,86 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
3
+Name:           python-snowballstemmer
4
+Version:        1.2.1
5
+Release:        1%{?dist}
6
+Summary:        Python stemming library
7
+License:        BSD
8
+Group:          Development/Languages/Python
9
+Url:            https://github.com/shibukawa/snowball_py
10
+Vendor:		VMware, Inc.
11
+Distribution:   Photon
12
+Source0:        https://pypi.python.org/packages/20/6b/d2a7cb176d4d664d94a6debf52cd8dbae1f7203c8e42426daa077051d59c/snowballstemmer-%{version}.tar.gz
13
+%define sha1    snowballstemmer=377be08ed935d401a53cba79319d1812cfe46b81
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-devel
17
+BuildRequires:  python2-libs
18
+
19
+Requires:       python2
20
+Requires:       python2-libs
21
+
22
+BuildArch:      noarch
23
+
24
+%description
25
+This package provides 16 stemmer algorithms (15 + Poerter English stemmer) generated from Snowball algorithms. 
26
+It includes following language algorithms:
27
+
28
+* Danish
29
+* Dutch
30
+* English (Standard, Porter)
31
+* Finnish
32
+* French
33
+* German
34
+* Hungarian
35
+* Italian
36
+* Norwegian
37
+* Portuguese
38
+* Romanian
39
+* Russian
40
+* Spanish
41
+* Swedish
42
+* Turkish
43
+
44
+%package -n     python3-snowballstemmer
45
+Summary:        Python stemming library
46
+BuildRequires:  python3
47
+BuildRequires:  python3-devel
48
+Requires:       python3
49
+Requires:       python3-libs
50
+
51
+%description -n python3-snowballstemmer
52
+
53
+Python 3 version.
54
+
55
+%prep
56
+%setup -n snowballstemmer-%{version}
57
+rm -rf ../p3dir
58
+cp -a . ../p3dir
59
+
60
+%build
61
+python2 setup.py build
62
+pushd ../p3dir
63
+python3 setup.py build
64
+popd
65
+
66
+%install
67
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
68
+pushd ../p3dir
69
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
70
+popd
71
+
72
+%check
73
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
74
+
75
+%files
76
+%defattr(-,root,root,-)
77
+%{python_sitelib}/*
78
+
79
+%files -n python3-snowballstemmer
80
+%defattr(-,root,root,-)
81
+%{python3_sitelib}/*
82
+
83
+%changelog
84
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.2.1-1
85
+-   Initial
... ...
@@ -1,20 +1,45 @@
1
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
2
+
1 3
 Summary:       Python documentation generator
2 4
 Name:          python-sphinx
3 5
 Version:       1.5.3
4
-Release:       2%{?dist}
6
+Release:       3%{?dist}
5 7
 Group:         Development/Tools
6
-Vendor:        VMware, Inc.
7 8
 License:       BSD-2-Clause
8 9
 URL:           http://www.vmware.com
10
+Vendor:        VMware, Inc.
11
+Distribution:  Photon
9 12
 Source0:       https://pypi.python.org/packages/a7/df/4487783152b14f2b7cd0b0c9afb119b262c584bf972b90ab544b61b74c62/Sphinx-%{version}.tar.gz
10 13
 %define sha1 Sphinx=e296be1f697ba5eda7941570d718544df8182648
11
-Distribution:  Photon
12 14
 BuildRequires: python2
13 15
 BuildRequires: python2-libs
14 16
 BuildRequires: python2-devel
15 17
 BuildRequires: python-setuptools
18
+BuildRequires: python-babel
19
+BuildRequires: python-docutils
20
+BuildRequires: python-jinja2
21
+BuildRequires: python-Pygments
22
+BuildRequires: python-six
23
+BuildRequires: python-alabaster
24
+BuildRequires: python-imagesize
25
+BuildRequires: python-requests
26
+BuildRequires: python-snowballstemmer
27
+BuildRequires: python-typing
28
+BuildRequires: python-pytest
29
+BuildRequires: python-pip
16 30
 
17
-Requires:       python2
31
+Requires:      python2
32
+Requires:      python2-libs
33
+Requires:      python-babel
34
+Requires:      python-docutils
35
+Requires:      python-jinja2
36
+Requires:      python-Pygments
37
+Requires:      python-six
38
+Requires:      python-alabaster
39
+Requires:      python-imagesize
40
+Requires:      python-requests
41
+Requires:      python-snowballstemmer
42
+Requires:      python-typing
18 43
 
19 44
 BuildArch:      noarch
20 45
 
... ...
@@ -26,21 +51,73 @@ Brandl. It was originally created to translate the new Python
26 26
 documentation, but has now been cleaned up in the hope that it will be
27 27
 useful to many other projects.
28 28
 
29
+%package -n    python3-sphinx
30
+Summary:       Python documentation generator
31
+BuildRequires: python3
32
+BuildRequires: python3-devel
33
+BuildRequires: python3-babel
34
+BuildRequires: python3-docutils
35
+BuildRequires: python3-jinja2
36
+BuildRequires: python3-Pygments
37
+BuildRequires: python3-six
38
+BuildRequires: python3-alabaster
39
+BuildRequires: python3-imagesize
40
+BuildRequires: python3-requests
41
+BuildRequires: python3-snowballstemmer
42
+BuildRequires: python3-pytest
43
+
44
+Requires:      python3
45
+Requires:      python3-libs
46
+Requires:      python3-babel
47
+Requires:      python3-docutils
48
+Requires:      python3-jinja2
49
+Requires:      python3-Pygments
50
+Requires:      python3-six
51
+Requires:      python3-alabaster
52
+Requires:      python3-imagesize
53
+Requires:      python3-requests
54
+Requires:      python3-snowballstemmer
55
+
56
+%description -n python3-sphinx
57
+
58
+Python 3 version.
59
+
29 60
 %prep
30 61
 %setup -q -n Sphinx-%{version}
62
+rm -rf ../p3dir
63
+cp -a . ../p3dir
31 64
 
32 65
 %build
33 66
 python setup.py build
67
+pushd ../p3dir
68
+python3 setup.py build
69
+popd
34 70
 
35 71
 %install
36 72
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
73
+pushd ../p3dir
74
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
75
+popd
76
+
77
+%check
78
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
79
+
80
+%clean
37 81
 
38 82
 %files
39 83
 %defattr(-,root,root)
40
-%{_bindir}/*
41 84
 %{python_sitelib}/*
42 85
 
86
+%files -n python3-sphinx
87
+%defattr(-,root,root)
88
+%{_bindir}/*
89
+%{python3_sitelib}/*
90
+
43 91
 %changelog
92
+*   Wed Apr 26 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.5.3-3
93
+-   BuildRequires and Requires python-babel, python-docutils, python-jinja2,
94
+    python-Pygments, python-six, python-alabaster, python-imagesize,
95
+    python-requests and python-snowballstemmer. Adding python3 version
44 96
 *   Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.5.3-2
45 97
 -   Fix arch
46 98
 *   Thu Mar 30 2017 Sarah Choi <sarahc@vmware.com> 1.5.3-1
47 99
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
1
+
2
+Name:           python-typing
3
+Version:        3.6.1
4
+Release:        1%{?dist}
5
+Summary:        Type Hints for Python
6
+License:        PSF
7
+Group:          Development/Tools
8
+Url:            https://docs.python.org/3/library/typing.html
9
+Vendor:		VMware, Inc.
10
+Distribution:   Photon
11
+Source0:        https://pypi.python.org/packages/17/75/3698d7992a828ad6d7be99c0a888b75ed173a9280e53dbae67326029b60e/typing-%{version}.tar.gz
12
+%define sha1    typing=d6ce2f6379d2594c174adb1c94643297600c979c
13
+
14
+BuildRequires:  python2
15
+BuildRequires:  python2-devel
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python-setuptools
18
+Requires:       python2
19
+Requires:       python2-libs
20
+
21
+BuildArch:      noarch
22
+
23
+%description
24
+Typing defines a standard notation for Python function and variable type annotations. The notation can be used for documenting code in a concise,
25
+standard format, and it has been designed to also be used by static and runtime type checkers, static analyzers, IDEs and other tools.
26
+
27
+%prep
28
+%setup -n typing-%{version}
29
+
30
+%build
31
+python2 setup.py build
32
+
33
+%install
34
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
35
+
36
+%check
37
+PATH=%{buildroot}%{_bindir}:${PATH} \
38
+PYTHONPATH=%{buildroot}%{python_sitelib} \
39
+    python2 python2/test_typing.py
40
+
41
+%files
42
+%defattr(-,root,root,-)
43
+%{python_sitelib}/*
44
+
45
+%changelog
46
+*   Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.6.1-1
47
+-   Initial