forked from pool/python-blue
- Initial packaging effort for blue 0.5.1
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blue?expand=0&rev=3
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea
|
||||
size 1096433
|
||||
3
blue-0.5.1.tar.gz
Normal file
3
blue-0.5.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:86cac45a88f9b2a426e2907c082cd90d90c663353a1003eeb7e26777bb1c73a3
|
||||
size 8693
|
||||
@@ -1,124 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 5 23:44:07 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
- Fix Python 3.6 for Leap 15.2 and for the upcoming python36 flavor
|
||||
in Tumbleweed: Requires python-dataclasses
|
||||
gh#openSUSE/python-rpm-macros#66
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 4 12:19:10 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Include change log and docs in package
|
||||
- Update to v20.8b1
|
||||
* Explicitly depend on Click 7.1.2 or newer as `Black` no longer
|
||||
works with versions older than 7.0
|
||||
- from v20.8b0
|
||||
* Re-implemented support for explicit trailing commas: now it
|
||||
works consistently within any bracket pair, including nested
|
||||
structures
|
||||
* Reindents docstrings when reindenting code around it
|
||||
* Show colored diffs
|
||||
* Supports Python 3.8 code, e.g. star expressions in return statements
|
||||
* No longer normalizes capital R-string prefixes as those have a
|
||||
community-accepted meaning
|
||||
* Uses exit code 2 when specified configuration file doesn't exit
|
||||
* Works on AWS Lambda
|
||||
* Added `--force-exclude` argument
|
||||
* Removed deprecated `--py36` option
|
||||
* Fixed `--diff` output when EOF is encountered
|
||||
* Fixed `# fmt: off` handling around decorators
|
||||
* Fixed unstable formatting with some `# type: ignore` comments
|
||||
* Fixed invalid removal on organizing brackets followed by indexing
|
||||
* Introduced `black-primer`, a CI tool that allows us to run
|
||||
regression tests against existing open source users of Black
|
||||
* Introduced property-based fuzzing to our test suite based on
|
||||
Hypothesis and Hypothersmith
|
||||
* Implemented experimental and disabled by default long string
|
||||
rewrapping hidden under a `--experimental-string-processing`
|
||||
flag while it's being worked on; this is an undocumented and
|
||||
unsupported feature
|
||||
* Vim plugin prefer virtualenv packages over global packages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 24 21:56:53 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
- update URL
|
||||
- python-aiohttp_cors is now available --> install blackd
|
||||
- skip python2 test on big endian platforms gh#psf/black#1109
|
||||
- drop fix-tests.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 27 09:36:28 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||
|
||||
- %python3_only -> %python_alternative
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 13 11:25:32 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- Add missing Requires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 14:14:38 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 19.10b0
|
||||
- add fix-tests.patch to avoid problem during test collection
|
||||
- dont distribute 'blackd' as missing deps
|
||||
* no obvious changelog
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 13:53:31 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Skip randomly failing test (only in OBS)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 21 15:44:47 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 19.3b0:
|
||||
* No obvious changelog
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 3 12:40:28 UTC 2018 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 18.9b0
|
||||
* numeric literals are now formatted by Black
|
||||
* numeric literals are normalized to include _ separators on Python 3.6+ code
|
||||
* added --skip-numeric-underscore-normalization to disable the above behavior
|
||||
and leave numeric underscores as they were in the input
|
||||
* code with _ in numeric literals is recognized as Python 3.6+
|
||||
* most letters in numeric literals are lowercased (e.g., in 1e10, 0x01)
|
||||
* hexadecimal digits are always uppercased (e.g. 0xBADC0DE)
|
||||
* added blackd, see its documentation for more info
|
||||
* adjacent string literals are now correctly split into multiple lines
|
||||
* trailing comma is now added to single imports that don't fit on a line
|
||||
* cache is now populated when --check is successful for a file which
|
||||
speeds up consecutive checks of properly formatted unmodified files
|
||||
* whitespace at the beginning of the file is now removed
|
||||
* fixed mangling pweave and Spyder IDE special comments
|
||||
* fixed unstable formatting when unpacking big tuples
|
||||
* fixed parsing of __future__ imports with renames
|
||||
* fixed scope of # fmt: off when directly preceding yield and other nodes
|
||||
* fixed formatting of lambda expressions with default arguments
|
||||
* fixed async for statements: Black no longer breaks them into separate lines
|
||||
* note: the Vim plugin stopped registering ,= as a default chord
|
||||
as it turned out to be a bad idea
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 29 10:31:11 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Raise minimal py required to be 3.6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 28 21:27:40 UTC 2018 - jengelh@inai.de
|
||||
|
||||
- Replace all the marketing in the description with something
|
||||
substantial.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 27 19:27:43 UTC 2018 - mimi.vx@gmail.com
|
||||
|
||||
- disable testsuite for py older than 3.7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 27 09:08:50 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Code formatter used by pytest/etc
|
||||
4
python-blue.changes
Normal file
4
python-blue.changes
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 17 22:49:08 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Initial packaging effort for blue 0.5.1
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-black
|
||||
# spec file for package python-blue
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,32 +18,28 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-black
|
||||
Version: 20.8b1
|
||||
%define modname blue
|
||||
Name: python-blue
|
||||
Version: 0.5.1
|
||||
Release: 0
|
||||
Summary: A code formatter written in, and written for Python
|
||||
License: MIT
|
||||
URL: https://github.com/psf/black
|
||||
Source: https://files.pythonhosted.org/packages/source/b/black/black-%{version}.tar.gz
|
||||
BuildRequires: %{python_module aiohttp >= 3.3.2}
|
||||
BuildRequires: %{python_module aiohttp_cors}
|
||||
BuildRequires: %{python_module appdirs}
|
||||
BuildRequires: %{python_module attrs >= 18.1.0}
|
||||
URL: https://github.com/grantjenks/blue
|
||||
Source: https://github.com/grantjenks/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
||||
BuildRequires: %{python_module Sphinx}
|
||||
BuildRequires: %{python_module base >= 3.6}
|
||||
BuildRequires: %{python_module click >= 7.1.2}
|
||||
BuildRequires: %{python_module mypy_extensions >= 0.4.3}
|
||||
BuildRequires: %{python_module pathspec >= 0.6}
|
||||
BuildRequires: %{python_module black}
|
||||
# BuildRequires: %%{python_module doc8}
|
||||
BuildRequires: %{python_module flake8}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module regex >= 2020.1.8}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module rstcheck}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module toml >= 0.10.1}
|
||||
BuildRequires: %{python_module typed-ast >= 1.4.0}
|
||||
BuildRequires: %{python_module typing_extensions}
|
||||
BuildRequires: (python36-dataclasses if python36-base)
|
||||
BuildRequires: (python3-dataclasses if python3-base < 3.7)
|
||||
BuildRequires: %{python_module twine}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: (python3-dataclasses if python3-base < 3.7)
|
||||
BuildRequires: (python36-dataclasses if python36-base)
|
||||
Requires: python-aiohttp >= 3.3.2
|
||||
Requires: python-aiohttp_cors
|
||||
Requires: python-appdirs
|
||||
@@ -75,53 +71,30 @@ start and end with "# fmt: off" and "# fmt: on", respectively. It
|
||||
also recognizes YAPF's block comments to the same effect.
|
||||
|
||||
%prep
|
||||
%setup -q -n black-%{version}
|
||||
sed -i '1{/#!/d}' src/black_primer/cli.py src/black_primer/lib.py
|
||||
%setup -q -n blue-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
# ( cd docs ; PYTHONPATH=../build/lib make html )
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/black
|
||||
%python_clone -a %{buildroot}%{_bindir}/blackd
|
||||
%python_clone -a %{buildroot}%{_bindir}/black-primer
|
||||
%{python_expand cp src/black_primer/primer.json %{buildroot}%{$python_sitelib}/black_primer/
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
}
|
||||
%python_clone -a %{buildroot}%{_bindir}/blue
|
||||
|
||||
%check
|
||||
# Copy one of the executable scripts into the PATH
|
||||
mkdir ~/bin
|
||||
cp $(ls %{buildroot}%{_bindir}/black-* | head -1) ~/bin/black
|
||||
export PATH=$PATH:~/bin
|
||||
|
||||
# test_expression_diff - sometimes fails on async timing in OBS
|
||||
skiptests="test_expression_diff"
|
||||
# https://github.com/psf/black/issues/1109
|
||||
if [ $(python3 -c 'import sys; print(sys.byteorder)') == 'big' ]; then
|
||||
skiptests+=" or test_python2"
|
||||
fi
|
||||
%pytest -k "not ($skiptests)"
|
||||
%pytest
|
||||
|
||||
%post
|
||||
%python_install_alternative black blackd black-primer
|
||||
%python_install_alternative blue
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative black
|
||||
%python_uninstall_alternative blue
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md CHANGES.md docs/*.md docs/reference
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%python_alternative %{_bindir}/black
|
||||
%python_alternative %{_bindir}/blackd
|
||||
%python_alternative %{_bindir}/black-primer
|
||||
%{python_sitelib}/_black_version.py*
|
||||
%{python_sitelib}/black_primer/
|
||||
%{python_sitelib}/black/
|
||||
%{python_sitelib}/blackd/
|
||||
%{python_sitelib}/blib2to3/
|
||||
%{python_sitelib}/black-%{version}-py*.egg-info
|
||||
%pycache_only %{python_sitelib}/__pycache__/*
|
||||
%python_alternative %{_bindir}/blue
|
||||
%{python_sitelib}/blue/
|
||||
%{python_sitelib}/blue-%{version}-py*.egg-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user