summaryrefslogtreecommitdiff
path: root/python-qrainbowstyle.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-qrainbowstyle.spec')
-rw-r--r--python-qrainbowstyle.spec348
1 files changed, 348 insertions, 0 deletions
diff --git a/python-qrainbowstyle.spec b/python-qrainbowstyle.spec
new file mode 100644
index 0000000..31d88cc
--- /dev/null
+++ b/python-qrainbowstyle.spec
@@ -0,0 +1,348 @@
+%global _empty_manifest_terminate_build 0
+Name: python-qrainbowstyle
+Version: 0.9.6
+Release: 1
+Summary: The most complete customizable stylesheet for Python and Qt applications
+License: MIT
+URL: https://github.com/desty2k/QRainbowStyleSheet
+Source0: https://mirrors.aliyun.com/pypi/web/packages/85/1b/c447f5d83c7f4f715091dff25598882f501ae4caae6b00483377370009b4/qrainbowstyle-0.9.6.tar.gz
+BuildArch: noarch
+
+Requires: python3-helpdev
+Requires: python3-qtpy
+Requires: python3-PyQtWebEngine
+Requires: python3-qtsass
+Requires: python3-watchdog
+Requires: python3-sphinx
+Requires: python3-sphinx-rtd-theme
+Requires: python3-pyqt5
+Requires: python3-pyside2
+
+%description
+QRainbowStyle is a fully customizable stylesheet for Python and Qt applications.
+
+This module provides a function to load pre-compiled stylesheets. To generate your own
+style based on custom color palette clone package from project homepage.
+
+qrainbowstyle.windows module adds frameless windows and message boxes.
+From version v0.8 module supports native Windows calls.
+Features:
+
+ - Borders snapping
+ - Minimize, restore, close animations
+ - Size grips on borders
+ - Frame shadow
+ - Aero shake
+
+.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_window_v3.png
+
+On Linux and Darwin qrainbowstyle will load class with its own implementation of these features.
+Due to a bug in Qt, window minimizing is not supported on MacOS.
+
+First, start importing our module
+
+.. code-block:: python
+
+ import qrainbowstyle
+
+Then you can get stylesheet provided by QRainbowStyle for various Qt wrappers
+as shown below
+
+.. code-block:: python
+
+ # PySide2
+ stylesheet = qrainbowstyle.load_stylesheet_pyside2(style='oceanic')
+ # PyQt5
+ stylesheet = qrainbowstyle.load_stylesheet_pyqt5(style='oceanic')
+
+Alternatively, from environment variables provided by QtPy, Qt.Py
+
+.. code-block:: python
+
+ # QtPy
+ stylesheet = qrainbowstyle.load_stylesheet(style='oceanic')
+ # Qt.Py
+ stylesheet = qrainbowstyle.load_stylesheet(style='oceanic', qt_api=Qt.__binding__)
+
+Finally, set your QApplication with it
+
+.. code-block:: python
+
+ app.setStyleSheet(stylesheet)
+
+To load frameless window in your app import both qrainbowstyle and qrainbowstyle.windows modules
+
+.. code-block:: python
+
+ import qrainbowstyle
+ import qrainbowstyle.windows
+
+Initialize qt app and load choosen stylesheet.
+Next, create instances of frameless window and your master widget with content you want to show.
+
+.. code-block:: python
+
+ # Create app and load selected stylesheet
+ app = QtWidgets.QApplication(sys.argv)
+ app.setStyleSheet(qrainbowstyle.load_stylesheet(style="oceanic"))
+
+ # Package options
+ # qrainbowstyle.alignButtonsLeft() # align titlebar buttons to left side
+ # qrainbowstyle.useDarwinButtons() # use darwin style buttons
+ qrainbowstyle.setAppName("My new application") # set global name for application
+ # qrainbowstyle.setAppIcon("icon.ico") # set global app icon
+
+ # Create frameless mainwindow
+ win = qrainbowstyle.windows.FramelessWindow()
+
+ # Create content widget and pass reference to main window
+ widget = MasterWidget(win)
+
+ # Add widget to main window and show it
+ win.addContentWidget(widget)
+ win.show()
+
+ sys.exit(app.exec())
+
+Enjoy!
+
+
+
+
+
+%package -n python3-qrainbowstyle
+Summary: The most complete customizable stylesheet for Python and Qt applications
+Provides: python-qrainbowstyle
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-qrainbowstyle
+QRainbowStyle is a fully customizable stylesheet for Python and Qt applications.
+
+This module provides a function to load pre-compiled stylesheets. To generate your own
+style based on custom color palette clone package from project homepage.
+
+qrainbowstyle.windows module adds frameless windows and message boxes.
+From version v0.8 module supports native Windows calls.
+Features:
+
+ - Borders snapping
+ - Minimize, restore, close animations
+ - Size grips on borders
+ - Frame shadow
+ - Aero shake
+
+.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_window_v3.png
+
+On Linux and Darwin qrainbowstyle will load class with its own implementation of these features.
+Due to a bug in Qt, window minimizing is not supported on MacOS.
+
+First, start importing our module
+
+.. code-block:: python
+
+ import qrainbowstyle
+
+Then you can get stylesheet provided by QRainbowStyle for various Qt wrappers
+as shown below
+
+.. code-block:: python
+
+ # PySide2
+ stylesheet = qrainbowstyle.load_stylesheet_pyside2(style='oceanic')
+ # PyQt5
+ stylesheet = qrainbowstyle.load_stylesheet_pyqt5(style='oceanic')
+
+Alternatively, from environment variables provided by QtPy, Qt.Py
+
+.. code-block:: python
+
+ # QtPy
+ stylesheet = qrainbowstyle.load_stylesheet(style='oceanic')
+ # Qt.Py
+ stylesheet = qrainbowstyle.load_stylesheet(style='oceanic', qt_api=Qt.__binding__)
+
+Finally, set your QApplication with it
+
+.. code-block:: python
+
+ app.setStyleSheet(stylesheet)
+
+To load frameless window in your app import both qrainbowstyle and qrainbowstyle.windows modules
+
+.. code-block:: python
+
+ import qrainbowstyle
+ import qrainbowstyle.windows
+
+Initialize qt app and load choosen stylesheet.
+Next, create instances of frameless window and your master widget with content you want to show.
+
+.. code-block:: python
+
+ # Create app and load selected stylesheet
+ app = QtWidgets.QApplication(sys.argv)
+ app.setStyleSheet(qrainbowstyle.load_stylesheet(style="oceanic"))
+
+ # Package options
+ # qrainbowstyle.alignButtonsLeft() # align titlebar buttons to left side
+ # qrainbowstyle.useDarwinButtons() # use darwin style buttons
+ qrainbowstyle.setAppName("My new application") # set global name for application
+ # qrainbowstyle.setAppIcon("icon.ico") # set global app icon
+
+ # Create frameless mainwindow
+ win = qrainbowstyle.windows.FramelessWindow()
+
+ # Create content widget and pass reference to main window
+ widget = MasterWidget(win)
+
+ # Add widget to main window and show it
+ win.addContentWidget(widget)
+ win.show()
+
+ sys.exit(app.exec())
+
+Enjoy!
+
+
+
+
+
+%package help
+Summary: Development documents and examples for qrainbowstyle
+Provides: python3-qrainbowstyle-doc
+%description help
+QRainbowStyle is a fully customizable stylesheet for Python and Qt applications.
+
+This module provides a function to load pre-compiled stylesheets. To generate your own
+style based on custom color palette clone package from project homepage.
+
+qrainbowstyle.windows module adds frameless windows and message boxes.
+From version v0.8 module supports native Windows calls.
+Features:
+
+ - Borders snapping
+ - Minimize, restore, close animations
+ - Size grips on borders
+ - Frame shadow
+ - Aero shake
+
+.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_window_v3.png
+
+On Linux and Darwin qrainbowstyle will load class with its own implementation of these features.
+Due to a bug in Qt, window minimizing is not supported on MacOS.
+
+First, start importing our module
+
+.. code-block:: python
+
+ import qrainbowstyle
+
+Then you can get stylesheet provided by QRainbowStyle for various Qt wrappers
+as shown below
+
+.. code-block:: python
+
+ # PySide2
+ stylesheet = qrainbowstyle.load_stylesheet_pyside2(style='oceanic')
+ # PyQt5
+ stylesheet = qrainbowstyle.load_stylesheet_pyqt5(style='oceanic')
+
+Alternatively, from environment variables provided by QtPy, Qt.Py
+
+.. code-block:: python
+
+ # QtPy
+ stylesheet = qrainbowstyle.load_stylesheet(style='oceanic')
+ # Qt.Py
+ stylesheet = qrainbowstyle.load_stylesheet(style='oceanic', qt_api=Qt.__binding__)
+
+Finally, set your QApplication with it
+
+.. code-block:: python
+
+ app.setStyleSheet(stylesheet)
+
+To load frameless window in your app import both qrainbowstyle and qrainbowstyle.windows modules
+
+.. code-block:: python
+
+ import qrainbowstyle
+ import qrainbowstyle.windows
+
+Initialize qt app and load choosen stylesheet.
+Next, create instances of frameless window and your master widget with content you want to show.
+
+.. code-block:: python
+
+ # Create app and load selected stylesheet
+ app = QtWidgets.QApplication(sys.argv)
+ app.setStyleSheet(qrainbowstyle.load_stylesheet(style="oceanic"))
+
+ # Package options
+ # qrainbowstyle.alignButtonsLeft() # align titlebar buttons to left side
+ # qrainbowstyle.useDarwinButtons() # use darwin style buttons
+ qrainbowstyle.setAppName("My new application") # set global name for application
+ # qrainbowstyle.setAppIcon("icon.ico") # set global app icon
+
+ # Create frameless mainwindow
+ win = qrainbowstyle.windows.FramelessWindow()
+
+ # Create content widget and pass reference to main window
+ widget = MasterWidget(win)
+
+ # Add widget to main window and show it
+ win.addContentWidget(widget)
+ win.show()
+
+ sys.exit(app.exec())
+
+Enjoy!
+
+
+
+
+
+%prep
+%autosetup -n qrainbowstyle-0.9.6
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-qrainbowstyle -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.9.6-1
+- Package Spec generated