Skip to content

Commit

Permalink
pyvim: Fix install time dependency for pyvim
Browse files Browse the repository at this point in the history
- Fixed install time dependency for pyvim
- Add python3-pyflakes

Change-Id: Ic239a500a3afd10253beaf39a4be1c1ae900d24a
Signed-off-by: Tapas Kundu <[email protected]>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/13869
Tested-by: gerrit-photon <[email protected]>
Reviewed-by: Shreenidhi Shedi <[email protected]>
  • Loading branch information
tapakund authored and sshedi committed Jul 15, 2021
1 parent 488fd24 commit dbd7532
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
50 changes: 50 additions & 0 deletions SPECS/python-pyflakes/python-pyflakes.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}

Name: python3-pyflakes
Version: 2.3.1
Release: 1%{?dist}
Summary: A simple program which checks Python source files for errors
License: MIT
Group: Development/Languages/Python
Url: https://github.com/PyCQA/pyflakes/archive/refs/tags/%{version}.tar.gz
Source0: pyflakes-%{version}.tar.gz
%define sha1 pyflakes=9798bb913a46fc8352d75098d94c837ec3559393
Vendor: VMware, Inc.
Distribution: Photon
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-libs
BuildRequires: python3-setuptools
Requires: python3
Requires: python3-libs
Requires: python3-setuptools
BuildArch: noarch

%description
Pyflakes is similar to PyChecker in scope, but differs in that it does
not execute the modules to check them. This is both safer and faster,
although it does not perform as many checks. Unlike PyLint, Pyflakes
checks only for logical errors in programs; it does not perform any
check on style.

%prep
%autosetup -n pyflakes-%{version}

%build
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} --skip-build
find %{buildroot}%{_libdir} -name '*.pyc' -delete

%check
python3 setup.py test

%files
%defattr(-,root,root,-)
%{_bindir}/pyflakes
%{python3_sitelib}/*

%changelog
* Fri Jul 09 2021 Tapas Kundu <[email protected]> 2.3.1-1
- Initial packaging for python3-pyflakes
9 changes: 6 additions & 3 deletions SPECS/python-pyvim/python-pyvim.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Summary: Pure Python Vi Implementation.
Name: python3-pyvim
Version: 3.0.2
Release: 2%{?dist}
Release: 3%{?dist}
License: UNKNOWN
Group: Development/Languages/Python
Vendor: VMware, Inc.
Expand All @@ -21,6 +21,7 @@ BuildRequires: python3-devel
BuildRequires: python3-libs
BuildRequires: python3-setuptools
BuildRequires: python3-xml
BuildRequires: python3-pyflakes
%if %{with_check}
BuildRequires: python3-pytest
BuildRequires: python3-prompt_toolkit
Expand All @@ -35,15 +36,15 @@ BuildRequires: python3-pip
Requires: python3
Requires: python3-libs
Requires: python3-prompt_toolkit

Requires: python3-pyflakes
BuildArch: noarch

%description
An implementation of Vim in Python.


%prep
%setup -q -n pyvim-%{version}
%autosetup -n pyvim-%{version}
#tar -xf %{SOURCE1} --no-same-owner

%build
Expand All @@ -63,6 +64,8 @@ PYTHONPATH=./ py.test3
%{_bindir}/pyvim3

%changelog
* Fri Jul 09 2021 Tapas Kundu <[email protected]> 3.0.2-3
- Fix dependency issue
* Tue Sep 29 2020 Satya Naga Vasamsetty <[email protected]> 3.0.2-2
- openssl 1.1.1
* Fri Jul 24 2020 Gerrit Photon <[email protected]> 3.0.2-1
Expand Down

0 comments on commit dbd7532

Please sign in to comment.