Browse code

Added prompt_toolkit, wcwidth and Pygments. (bug 1840495).

Change-Id: I5579c4ada165c51c8389a00d83ecc933cd5c343c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2301
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
(cherry picked from commit 8fe832bd6af152946558b437b0eff9276bebfa1f)
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2302
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>

xiaolin-vmware authored on 2017/04/06 07:56:11
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,82 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -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
+Summary:        Pygments is a syntax highlighting package written in Python.
4
+Name:           python-Pygments
5
+Version:        2.2.0
6
+Release:        1%{?dist}
7
+License:        BSD
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://pypi.python.org/pypi/Pygments
12
+Source0:        https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz
13
+%define         sha1 Pygments=5c6714bd6fd950c1478889f7b72fc7f6771d5163
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+
20
+Requires:       python2
21
+Requires:       python2-libs
22
+
23
+BuildArch:      noarch
24
+
25
+%description
26
+Pygments is a syntax highlighting package written in Python.
27
+
28
+It is a generic syntax highlighter suitable for use in code hosting, forums, wikis or other applications that need to prettify source code. Highlights are:
29
+
30
+a wide range of over 300 languages and other text formats is supported
31
+special attention is paid to details, increasing quality by a fair amount
32
+support for new languages and formats are added easily
33
+a number of output formats, presently HTML, LaTeX, RTF, SVG, all image formats that PIL supports and ANSI sequences
34
+it is usable as a command-line tool and as a library.
35
+
36
+%package -n     python3-Pygments
37
+Summary:        python-Pygments
38
+BuildRequires:  python3-devel
39
+BuildRequires:  python3-libs
40
+
41
+Requires:       python3
42
+Requires:       python3-libs
43
+
44
+%description -n python3-Pygments
45
+Python 3 version.
46
+
47
+%prep
48
+%setup -q -n Pygments-%{version}
49
+rm -rf ../p3dir
50
+cp -a . ../p3dir
51
+
52
+%build
53
+python2 setup.py build
54
+pushd ../p3dir
55
+python3 setup.py build
56
+popd
57
+
58
+%install
59
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
60
+pushd ../p3dir
61
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
62
+popd
63
+
64
+%check
65
+python2 setup.py test
66
+pushd ../p3dir
67
+python3 setup.py test
68
+popd
69
+
70
+%files
71
+%defattr(-,root,root)
72
+%{python2_sitelib}/*
73
+
74
+%files -n python3-Pygments
75
+%defattr(-,root,root)
76
+%{python3_sitelib}/*
77
+%{_bindir}/*
78
+
79
+%changelog
80
+*   Wed Apr 05 2017 Xiaolin Li <xiaolinl@vmware.com> 2.2.0-1
81
+-   Initial packaging for Photon
0 82
new file mode 100644
... ...
@@ -0,0 +1,73 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -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
+Summary:        Library for building powerful interactive command lines in Python.
4
+Name:           python-prompt_toolkit
5
+Version:        1.0.14
6
+Release:        1%{?dist}
7
+License:        BSD
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://pypi.python.org/pypi/prompt_toolkit
12
+Source0:        https://files.pythonhosted.org/packages/source/p/prompt_toolkit/prompt_toolkit-%{version}.tar.gz
13
+%define         sha1 prompt_toolkit=fa723a6f33927917cc4d98a4f82b0d82970a80e7
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+
20
+Requires:       python2
21
+Requires:       python2-libs
22
+
23
+BuildArch:      noarch
24
+
25
+%description
26
+prompt_toolkit is a library for building powerful interactive command lines and terminal applications in Python.
27
+
28
+%package -n     python3-prompt_toolkit
29
+Summary:        python-prompt_toolkit
30
+BuildRequires:  python3-devel
31
+BuildRequires:  python3-libs
32
+
33
+Requires:       python3
34
+Requires:       python3-libs
35
+
36
+%description -n python3-prompt_toolkit
37
+Python 3 version.
38
+
39
+%prep
40
+%setup -q -n prompt_toolkit-%{version}
41
+rm -rf ../p3dir
42
+cp -a . ../p3dir
43
+
44
+%build
45
+python2 setup.py build
46
+pushd ../p3dir
47
+python3 setup.py build
48
+popd
49
+
50
+%install
51
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
52
+pushd ../p3dir
53
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
54
+popd
55
+
56
+%check
57
+python2 setup.py test
58
+pushd ../p3dir
59
+python3 setup.py test
60
+popd
61
+
62
+%files
63
+%defattr(-,root,root)
64
+%{python2_sitelib}/*
65
+
66
+%files -n python3-prompt_toolkit
67
+%defattr(-,root,root)
68
+%{python3_sitelib}/*
69
+
70
+%changelog
71
+*   Wed Apr 05 2017 Xiaolin Li <xiaolinl@vmware.com> 1.0.14-1
72
+-   Initial packaging for Photon
0 73
new file mode 100644
... ...
@@ -0,0 +1,73 @@
0
+%{!?python2_sitelib: %define python2_sitelib %(python2 -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
+Summary:        Measures number of Terminal column cells of wide-character codes.
4
+Name:           python-wcwidth
5
+Version:        0.1.7
6
+Release:        1%{?dist}
7
+License:        MIT
8
+Group:          Development/Languages/Python
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Url:            https://pypi.python.org/pypi/wcwidth
12
+Source0:        https://files.pythonhosted.org/packages/source/w/wcwidth/wcwidth-%{version}.tar.gz
13
+%define         sha1 wcwidth=28df2f5e8cd67ec182d822350252fea9bc3a91c8
14
+
15
+BuildRequires:  python2
16
+BuildRequires:  python2-libs
17
+BuildRequires:  python2-devel
18
+BuildRequires:  python-setuptools
19
+
20
+Requires:       python2
21
+Requires:       python2-libs
22
+
23
+BuildArch:      noarch
24
+
25
+%description
26
+This Library is mainly for those implementing a Terminal Emulator, or programs that carefully produce output to be interpreted by one.
27
+
28
+%package -n     python3-wcwidth
29
+Summary:        python-wcwidth
30
+BuildRequires:  python3-devel
31
+BuildRequires:  python3-libs
32
+
33
+Requires:       python3
34
+Requires:       python3-libs
35
+
36
+%description -n python3-wcwidth
37
+Python 3 version.
38
+
39
+%prep
40
+%setup -q -n wcwidth-%{version}
41
+rm -rf ../p3dir
42
+cp -a . ../p3dir
43
+
44
+%build
45
+python2 setup.py build
46
+pushd ../p3dir
47
+python3 setup.py build
48
+popd
49
+
50
+%install
51
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
52
+pushd ../p3dir
53
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
54
+popd
55
+
56
+%check
57
+python2 setup.py test
58
+pushd ../p3dir
59
+python3 setup.py test
60
+popd
61
+
62
+%files
63
+%defattr(-,root,root)
64
+%{python2_sitelib}/*
65
+
66
+%files -n python3-wcwidth
67
+%defattr(-,root,root)
68
+%{python3_sitelib}/*
69
+
70
+%changelog
71
+*   Wed Apr 05 2017 Xiaolin Li <xiaolinl@vmware.com> 0.1.7-1
72
+-   Initial packaging for Photon