- Ensured black profile was complete, adding missing line_length definition. - update to version 5.0.1: - Fixed a runtime error in a vendored dependency (toml). - update to version 5.0.0: - Breaking changes: - isort now requires Python 3.6+ to run but continues to support formatting on ALL versions of python including Python 2 code. - isort deprecates official support for Python 3.4, removing modules only in this release from known_standard_library: - user - Config files are no longer composed on-top of each-other. Instead the first config file found is used. - Since there is no longer composition negative form settings (such as --dont-skip) are no longer required and have been removed. - Two-letter shortened setting names (like ac for atomic) now require two dashes to avoid ambiguity: --ac. - For consistency with other tools -v now is shorthand for verbose and -V is shorthand for version. See Issue: #1067. - length_sort_{section_name} config usage has been deprecated. Instead length_sort_sections list can be used to specify a list of sections that need to be length sorted. - safety_excludes and unsafe have been deprecated - Config now includes as default full set of safety directories defined by safety excludes. - --recursive option has been removed. Directories passed in are now automatically sorted recursive. - --apply option has been removed as it is the default behaviour. - isort now does nothing, beyond giving instructions and exiting status code 0, when ran with no arguments. - a new --interactive flag has been added to enable the old style behaviour. - isort now works on contiguous sections of imports, instead of one whole file at a time. - isort now formats all nested "as" imports in the "from" form. import x.y as a becomes from x import y as a. - keep_direct_and_as_imports option now defaults to True. - appdirs is no longer supported. Unless manually specified, config should be project config only. - toml is now installed as a vendorized module, meaning pyproject.toml based config is always supported. - Completely new Python API, old version is removed and no longer accessible. - New module placement logic and module fully replaces old finders. Old approach is still available via --old-finders. - Internal: - isort now utilizes mypy and typing to filter out typing related issues before deployment. - isort now utilizes black internally to ensure more consistent formatting. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymisp?expand=0&rev=70
106 lines
3.4 KiB
RPMSpec
106 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package python-pymisp
|
|
#
|
|
# Copyright (c) 2020 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define skip_python2 1
|
|
%define misp_objects_revision b7c2562a4f2b79b3764a8e3fcd38d24bb5abfa33
|
|
Name: python-pymisp
|
|
Version: 2.4.128
|
|
Release: 0
|
|
Summary: Python API for MISP
|
|
License: BSD-2-Clause
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/MISP/PyMISP
|
|
Source0: https://github.com/MISP/PyMISP/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
# github tarball misses the misp-objects subproject data
|
|
Source1: https://github.com/MISP/misp-objects/archive/%{misp_objects_revision}.tar.gz#/misp-objects.tar.gz
|
|
# pypi tarball missing some files: https://github.com/MISP/PyMISP/issues/554
|
|
#Source: https://files.pythonhosted.org/packages/source/p/pymisp/pymisp-%%{version}.tar.gz
|
|
# packaging tool
|
|
Source2: update-misp-objects.sh
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-jsonschema
|
|
Requires: python-python-dateutil
|
|
Requires: python-requests
|
|
Recommends: %{name}-doc
|
|
Recommends: python-magic
|
|
Suggests: python-pydeep
|
|
BuildArch: noarch
|
|
# SECTION tests
|
|
BuildRequires: %{python_module Deprecated}
|
|
BuildRequires: %{python_module jsonschema}
|
|
BuildRequires: %{python_module python-dateutil}
|
|
BuildRequires: %{python_module python-magic}
|
|
BuildRequires: %{python_module requests-mock}
|
|
BuildRequires: %{python_module requests}
|
|
# /SECTION
|
|
# SECTION docs
|
|
BuildRequires: python3-CommonMark
|
|
BuildRequires: python3-Sphinx
|
|
BuildRequires: python3-recommonmark
|
|
BuildRequires: python3-sphinx-autodoc-typehints
|
|
# /SECTION
|
|
Requires: python-Deprecated
|
|
%python_subpackages
|
|
|
|
%package -n %{name}-doc
|
|
Summary: Examples and Documentation for %{name}
|
|
Group: Documentation/HTML
|
|
|
|
%description
|
|
PyMISP is a Python library to access MISP platforms via their REST API.
|
|
|
|
PyMISP allows you to fetch events, add or update events/attributes, add or update samples or search for attributes.
|
|
|
|
%description -n %{name}-doc
|
|
Examples and HTML documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n PyMISP-%{version}
|
|
%setup -T -D -b 1 -n PyMISP-%{version}
|
|
mv ../misp-objects-*/* pymisp/data/misp-objects/
|
|
find pymisp examples -name "*.py" -type f -exec sed -i '1s/^#!.*//' '{}' \+
|
|
|
|
%build
|
|
%python_build
|
|
pushd docs
|
|
export LANG=en_US.UTF-8
|
|
make %{?_smp_mflags} html
|
|
rm build/html/.buildinfo
|
|
popd
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
export LANG=en_US.UTF-8
|
|
%python_exec setup.py test
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{python_sitelib}/*
|
|
|
|
%files -n %{name}-doc
|
|
%doc examples docs/build/html
|
|
|
|
%changelog
|