commit 4fc573d3a79aa895ee436ed0cf421f03ab77b215cdca2ca603f71926ea24bdda Author: Atri Bhattacharya Date: Fri Dec 29 06:02:28 2023 +0000 Accepting request 1135125 from home:bnavigator:branches:science yet antother update, still required by PrusaSlicer OBS-URL: https://build.opensuse.org/request/show/1135125 OBS-URL: https://build.opensuse.org/package/show/science/libbgcode?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..78ded31 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + python-pybgcode + diff --git a/_service b/_service new file mode 100644 index 0000000..d532464 --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + https://github.com/prusa3d/libbgcode.git + git + main + + 0.2.0+git%cd.%h + + + + + *.tar + xz + + + \ No newline at end of file diff --git a/libbgcode-0.2.0+git20231219.7aaf717.tar.xz b/libbgcode-0.2.0+git20231219.7aaf717.tar.xz new file mode 100644 index 0000000..91843d2 --- /dev/null +++ b/libbgcode-0.2.0+git20231219.7aaf717.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ab2a6f797f0b22a5bad277dfa8bbf1bcca0e878bbce85acfb28d8006b0cff5e +size 277432 diff --git a/libbgcode.changes b/libbgcode.changes new file mode 100644 index 0000000..dc16e5d --- /dev/null +++ b/libbgcode.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Dec 25 14:10:28 UTC 2023 - Ben Greiner + +- Initial specfile for v0.2.0+git20231219.7aaf717 +- Required by PrusaSlicer 2.7 diff --git a/libbgcode.obsinfo b/libbgcode.obsinfo new file mode 100644 index 0000000..75ebbb9 --- /dev/null +++ b/libbgcode.obsinfo @@ -0,0 +1,4 @@ +name: libbgcode +version: 0.2.0+git20231219.7aaf717 +mtime: 1702986039 +commit: 7aaf717fef6a83e4568b67729d5b0267453de815 diff --git a/libbgcode.spec b/libbgcode.spec new file mode 100644 index 0000000..c13f8bb --- /dev/null +++ b/libbgcode.spec @@ -0,0 +1,131 @@ +# +# spec file for package libbgcode +# +# Copyright (c) 2023 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/ +# + + +%define libname libbgcode +# get this from the pyproject.toml and adjust the _service file accordingly +%define libversion 0.2.0 +%define soversion 0_2_0 +Name: libbgcode +# Use the set_version source service for adjusting the field below +Version: 0.2.0+git20231219.7aaf717 +Release: 0 +Summary: Prusa Block & Binary G-code reader / writer / converter +License: AGPL-3.0-only +URL: https://github.com/prusa3d/libbgcode +Source0: libbgcode-%{version}.tar.xz +BuildRequires: boost-devel >= 1.78 +BuildRequires: cmake +BuildRequires: c++_compiler +BuildRequires: heatshrink +BuildRequires: libboost_nowide-devel >= 1.78 +BuildRequires: zlib-devel +BuildRequires: cmake(heatshrink) +BuildRequires: (cmake(Catch2) >= 2.9 with cmake(Catch2) < 3) + + +%description +A new G-code file format featuring the following improvements over the legacy G-code: +1) Block structure with distinct blocks for metadata vs. G-code +2) Faster navigation +3) Coding & compression for smaller file size +4) Checksum for data validity +5) Extensivity through new (custom) blocks. For example, a file signature block may be welcome by corporate customers. + +bgcode is a command line application which allows to convert gcode files from ascii to binary format and viceversa. + +%package -n %{libname}_core%{soversion} +Summary: Prusa Block & Binary G-code reader / writer / converter + +%description -n %{libname}_core%{soversion} +A new G-code file format -- Core Library + +Contains the basic definitions and functionality which allow to read a G-code file in binary format + +%package -n %{libname}_binarize%{soversion} +Summary: Prusa Block & Binary G-code reader / writer / converter + +%description -n %{libname}_binarize%{soversion} +A new G-code file format -- Binarize Library + +Contains the definitions and functionality which allow to write a G-code file in binary format + +%package -n %{libname}_convert%{soversion} +Summary: Prusa Block & Binary G-code reader / writer / converter + +%description -n %{libname}_convert%{soversion} +A new G-code file format -- Convert Library + +Contains the functionality which allow to convert G-code files to/from binary format + +%package devel +Summary: Prusa Block & Binary G-code reader / writer / converter development files +Requires: %{libname}_binarize%{soversion} = %{version} +Requires: %{libname}_convert%{soversion} = %{version} +Requires: %{libname}_core%{soversion} = %{version} +Requires: %{name} = %{version} + +%description devel +Files required to develop applications using %{name}, the +Prusa Block & Binary G-code reader / writer / converter library + +%prep +%setup -q -n libbgcode-%{version} + +%build +%cmake \ + -DLibBGCode_BUILD_DEPS:BOOL=OFF + +%cmake_build + +%install +%cmake_install + +%check +%ctest + +%ldconfig_scriptlets -n %{libname}_core%{soversion} +%ldconfig_scriptlets -n %{libname}_binarize%{soversion} +%ldconfig_scriptlets -n %{libname}_convert%{soversion} + +%files +%license LICENSE +%doc README.md +%{_bindir}/bgcode + +%files -n %{libname}_core%{soversion} +%license LICENSE +%{_libdir}/%{libname}_core.so.%{libversion} + +%files -n %{libname}_binarize%{soversion} +%license LICENSE +%{_libdir}/%{libname}_binarize.so.%{libversion} + +%files -n %{libname}_convert%{soversion} +%license LICENSE +%{_libdir}/%{libname}_convert.so.%{libversion} + +%files devel +%license LICENSE +%doc README.md +%{_libdir}/%{libname}_core.so +%{_libdir}/%{libname}_binarize.so +%{_libdir}/%{libname}_convert.so +%{_includedir}/LibBGCode +%{_libdir}/cmake/LibBGCode + +%changelog diff --git a/pyproject.opensuse.toml b/pyproject.opensuse.toml new file mode 100644 index 0000000..a12e1d3 --- /dev/null +++ b/pyproject.opensuse.toml @@ -0,0 +1,6 @@ +[cmake.options] +PyBGCode_LINK_SYSTEM_LIBBGCODE = "on" +CMAKE_BUILD_TYPE = "RelWithDebInfo" +CMAKE_MODULE_LINKER_FLAGS = "-flto=auto -Wl,--as-needed" +CMAKE_C_FLAGS = "@optflags@" +CMAKE_CXX_FLAGS = "@optflags@" diff --git a/python-pybgcode.changes b/python-pybgcode.changes new file mode 100644 index 0000000..55bd86f --- /dev/null +++ b/python-pybgcode.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Dec 25 21:23:00 UTC 2023 - Ben Greiner + +- Initial specfile for v0.2.0+git20231219.7aaf717 +- Multibuild with libbgcode diff --git a/python-pybgcode.rpmlintrc b/python-pybgcode.rpmlintrc new file mode 100644 index 0000000..760bca4 --- /dev/null +++ b/python-pybgcode.rpmlintrc @@ -0,0 +1,2 @@ +# empty entrypoints is okay +addFilter("zero-length .*dist-info/entry_points.txt") diff --git a/python-pybgcode.spec b/python-pybgcode.spec new file mode 100644 index 0000000..335f0c0 --- /dev/null +++ b/python-pybgcode.spec @@ -0,0 +1,74 @@ +# +# spec file for package python-pybgcode +# +# Copyright (c) 2023 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/ +# + +%define pyversion 0.2.0 +Name: python-pybgcode +# Use the set_version source service for adjusting the field below +Version: 0.2.0+git20231219.7aaf717 +Release: 0 +Summary: Python bindings for libbgcode +License: AGPL-3.0-only +URL: https://github.com/prusa3d/libbgcode +Source0: libbgcode-%{version}.tar.xz +Source1: pyproject.opensuse.toml +Source99: python-pybgcode.rpmlintrc +BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pybind11-devel} +BuildRequires: %{python_module py-build-cmake >= 0.1.8} +BuildRequires: python-rpm-macros +BuildRequires: git-core +BuildRequires: c++_compiler +BuildRequires: cmake(LibBGCode) = %{pyversion} +BuildRequires: libboost_nowide-devel >= 1.78 +BuildRequires: boost-devel >= 1.78 +%python_subpackages + +%description +A new G-code file format featuring the following improvements over the legacy G-code: +1) Block structure with distinct blocks for metadata vs. G-code +2) Faster navigation +3) Coding & compression for smaller file size +4) Checksum for data validity +5) Extensivity through new (custom) blocks. For example, a file signature block may be welcome by corporate customers. + +This package provides the Python language bindings for LibBGCode + +%prep +%setup -q -n libbgcode-%{version} +cp %{SOURCE1} ./ +sed -i 's/@optflags@/%{optflags}/' pyproject.opensuse.toml + +%build +export PIP_CONFIG_SETTINGS=--local=pyproject.opensuse.toml +%pyproject_wheel + +%install +%pyproject_install + +%check +mv pybgcode/pybgcode pybgcode/pybgcode.movedaway +cp tests/data/mini_cube_b_ref.gcode test.gcode +%pytest_arch + +%files %{python_files} +%license LICENSE +%{python_sitearch}/pybgcode +%{python_sitearch}/pybgcode-%{pyversion}.dist-info + +%changelog