%global _empty_manifest_terminate_build 0 Name: python-atom Version: 0.9.1 Release: 1 Summary: Memory efficient Python objects License: ========================= The Atom licensing terms ========================= Atom is licensed under the terms of the Modified BSD License (also known as New or Revised BSD), as follows: Copyright (c) 2013-2017, Nucleic Development Team Copyright (c) 2013, Enthought, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Nucleic Development Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. About Atom ---------- Chris Colbert began the Atom project under the umbrella of Enthought, Inc. in February 2013. The project was forked into the Nucleic project in March 2013. Chris is still the project lead. The Nucleic Development Team is the set of all contributors to the Nucleic project and its subprojects. The core team that coordinates development on GitHub can be found here: http://github.com/nucleic. The current team consists of: Core Developers: * Chris Colbert * Matthieu Dartiailh Active Contributors: * Steven Silvester * Dave Willmer Our Copyright Policy -------------------- Nucleic uses a shared copyright model. Each contributor maintains copyright over their contributions to Nucleic. But, it is important to note that these contributions are typically only changes to the repositories. Thus, the Nucleic source code, in its entirety is not the copyright of any single person or institution. Instead, it is the collective copyright of the entire Nucleic Development Team. If individual contributors want to maintain a record of what changes/contributions they have specific copyright on, they should indicate their copyright in the commit message of the change, when they commit the change to one of the Nucleic repositories. With this in mind, the following banner should be used in any source code file to indicate the copyright and license terms: #------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #------------------------------------------------------------------------------ URL: https://pypi.org/project/atom/ Source0: https://mirrors.nju.edu.cn/pypi/web/packages/88/5b/55fa9af6229735dfadb021c24e4a35c03c9b95fc581bca60cddb7bbec95b/atom-0.9.1.tar.gz Requires: python3-typing-extensions %description Atom is a framework for creating memory efficient Python objects with enhanced features such as dynamic initialization, validation, and change notification for object attributes. It provides the default model binding behavior for the `Enaml `_ UI framework. Examples: from atom.api import Atom, Str, Range, Bool, observe class Person(Atom): """ A simple class representing a person object. """ last_name = Str() first_name = Str() age = Range(low=0) debug = Bool(False) @observe('age') def debug_print(self, change): """ Prints out a debug message whenever the person's age changes. """ if self.debug: templ = "{first} {last} is {age} years old." s = templ.format( first=self.first_name, last=self.last_name, age=self.age, ) print(s) def _default_first_name(self): return 'John' john = Person(last_name='Doe', age=42) john.debug = True john.age = 43 # prints message john.age = 'forty three' # raises TypeError Starting with atom 0.8.0 atom object can also be defined using type annotations. from atom.api import Atom, observe class InventoryItem(Atom): """Class for keeping track of an item in inventory.""" name: str unit_price: float quantity_on_hand: int = 0 def total_cost(self) -> float: return self.unit_price * self.quantity_on_hand @observe("unit_price") def check_for_price_reduction(self, change): savings = change.get("oldvalue", 0) - change.get("value") if savings > 0: print(f"Save ${savings} now on {self.name}s!") >>> w = InventoryItem(name="widget", unit_price=1.99, quantity_on_hand=10) >>> w.unit_price = 1.00 Save $0.99 now on widgets! For version information, see `the Revision History `_. %package -n python3-atom Summary: Memory efficient Python objects Provides: python-atom BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-atom Atom is a framework for creating memory efficient Python objects with enhanced features such as dynamic initialization, validation, and change notification for object attributes. It provides the default model binding behavior for the `Enaml `_ UI framework. Examples: from atom.api import Atom, Str, Range, Bool, observe class Person(Atom): """ A simple class representing a person object. """ last_name = Str() first_name = Str() age = Range(low=0) debug = Bool(False) @observe('age') def debug_print(self, change): """ Prints out a debug message whenever the person's age changes. """ if self.debug: templ = "{first} {last} is {age} years old." s = templ.format( first=self.first_name, last=self.last_name, age=self.age, ) print(s) def _default_first_name(self): return 'John' john = Person(last_name='Doe', age=42) john.debug = True john.age = 43 # prints message john.age = 'forty three' # raises TypeError Starting with atom 0.8.0 atom object can also be defined using type annotations. from atom.api import Atom, observe class InventoryItem(Atom): """Class for keeping track of an item in inventory.""" name: str unit_price: float quantity_on_hand: int = 0 def total_cost(self) -> float: return self.unit_price * self.quantity_on_hand @observe("unit_price") def check_for_price_reduction(self, change): savings = change.get("oldvalue", 0) - change.get("value") if savings > 0: print(f"Save ${savings} now on {self.name}s!") >>> w = InventoryItem(name="widget", unit_price=1.99, quantity_on_hand=10) >>> w.unit_price = 1.00 Save $0.99 now on widgets! For version information, see `the Revision History `_. %package help Summary: Development documents and examples for atom Provides: python3-atom-doc %description help Atom is a framework for creating memory efficient Python objects with enhanced features such as dynamic initialization, validation, and change notification for object attributes. It provides the default model binding behavior for the `Enaml `_ UI framework. Examples: from atom.api import Atom, Str, Range, Bool, observe class Person(Atom): """ A simple class representing a person object. """ last_name = Str() first_name = Str() age = Range(low=0) debug = Bool(False) @observe('age') def debug_print(self, change): """ Prints out a debug message whenever the person's age changes. """ if self.debug: templ = "{first} {last} is {age} years old." s = templ.format( first=self.first_name, last=self.last_name, age=self.age, ) print(s) def _default_first_name(self): return 'John' john = Person(last_name='Doe', age=42) john.debug = True john.age = 43 # prints message john.age = 'forty three' # raises TypeError Starting with atom 0.8.0 atom object can also be defined using type annotations. from atom.api import Atom, observe class InventoryItem(Atom): """Class for keeping track of an item in inventory.""" name: str unit_price: float quantity_on_hand: int = 0 def total_cost(self) -> float: return self.unit_price * self.quantity_on_hand @observe("unit_price") def check_for_price_reduction(self, change): savings = change.get("oldvalue", 0) - change.get("value") if savings > 0: print(f"Save ${savings} now on {self.name}s!") >>> w = InventoryItem(name="widget", unit_price=1.99, quantity_on_hand=10) >>> w.unit_price = 1.00 Save $0.99 now on widgets! For version information, see `the Revision History `_. %prep %autosetup -n atom-0.9.1 %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-atom -f filelist.lst %dir %{python3_sitearch}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 11 2023 Python_Bot - 0.9.1-1 - Package Spec generated