File wireviz.spec of Package wireviz

#
# spec file for package wireviz
#
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# 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/
#


Name:           wireviz
Version:        0.2
Release:        0
Summary:        A tool for documenting cables and wiring harnesses
License:        GPL-3.0-only
URL:            https://github.com/formatc1702/WireViz
Source:         https://github.com/formatc1702/WireViz/archive/v%{version}.tar.gz#/WireViz-%{version}.tar.gz
BuildRequires:  python3-setuptools
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python3-Pillow
Requires:       python3-PyYAML
Requires:       python3-graphviz
BuildArch:      noarch

%description
WireViz is a tool for easily documenting cables, wiring harnesses
and connector pinouts. It takes plain text, YAML-formatted files
as input and produces beautiful graphical output (SVG, PNG, ...)
It handles automatic BOM (Bill of Materials) creation and has a lot
of extra features.

Features
  * WireViz input files are fully text based
    + No special editor required
    + Human readable
    + Easy version control
    + YAML syntax
    + UTF-8 input and output files for special character support
  * Understands and uses color abbreviations as per IEC 60757
    (black=BK, red=RD, ...)
  * Auto-generates standard wire color schemes and allows custom
    ones if needed
    + DIN 47100 (WT/BN/GN/YE/GY/PK/BU/RD/BK/VT/...)
    + IEC 60757 (BN/RD/OR/YE/GN/BU/VT/GY/WT/BK/...)
    + 25 Pair Color Code (BUWH/WHBU/OGWH/WHOG/GNWH/WHGN/BNWH/...)
    +  TIA/EIA 568 A/B (Subset of 25-Pair, used in CAT-5/6/...)
  * Understands wire gauge in mm² or AWG
    + Optionally auto-calculates equivalent gauge between mm²
      and AWG
  * Is suitable for both very simple cables, and more complex
    harnesses.
  * Allows for easy-autorouting for 1-to-1 wiring
  * Generates BOM (Bill of Materials)

Note:
WireViz is not designed to represent the complete wiring of a system.
Its main aim is to document the construction of individual wires and
harnesses.

%package doc
Summary:        Documentation files for %{name}
Group:          Documentation/Other

%description doc
Documentation, examples and tutorial for %{name}.

%prep
%setup -q -n WireViz-%{version}
sed -i -e '/^#!\//, 1d' src/wireviz/{build_examples.py,DataClasses.py,Harness.py,wv_colors.py,wv_helper.py}

%build
%python3_build

%install
%python3_install
%fdupes %{buildroot}%{python3_sitelib}
sed -i -e '/^#!\//, 1d' %{buildroot}%{python3_sitelib}/wireviz/wireviz.py

%check
# no tests yet

%files
%license LICENSE
%{_bindir}/wireviz
%doc docs/{advanced_image_usage.md,CHANGELOG.md,README.md,syntax.md}
%{python3_sitelib}/wireviz*

%files doc
%doc examples/ tutorial/

%changelog
openSUSE Build Service is sponsored by