-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-traits.spec
62 lines (53 loc) · 2.27 KB
/
python-traits.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%define module traits
Summary: Enthought Tool Suite - explicitly typed attributes for Python
Name: python-%{module}
Version: 6.4.3
Release: 1
Source0: https://pypi.python.org/packages/source/t/traits/traits-%{version}.tar.gz
Source1: %{name}.rpmlintrc
License: BSD
Group: Development/Python
Url: https://github.com/enthought/traits/
Obsoletes: python-enthought-traits-ui
Obsoletes: python-enthought-traits
Requires: python-numpy >= 1.1.0
BuildRequires: python-setupdocs >= 1.0.5
BuildRequires: python-setuptools >= 0.6c8
BuildRequires: python-sphinx
BuildRequires: python-devel
%description
The Traits project allows Python programmers to use a special kind of type
definition called a trait which provides object attributes with some
additional characteristics:
* Initialization: A trait has a default value, which is automatically
set as the initial value of an attribute before its first use in a
program.
* Validation: A trait attribute's type is explicitly declared. The
type is evident in the code, and only values that meet a
programmer-specified set of criteria (i.e., the trait definition)
can be assigned to that attribute.
* Delegation: The value of a trait attribute can be contained either
in the defining object or in another object delegated to by the
trait.
* Notification: Setting the value of a trait attribute can notify
other parts of the program that the value has changed.
* Visualization: User interfaces that allow a user to interactively
modify the value of a trait attribute can be automatically
constructed using the trait's definition. (This feature requires
that a supported GUI toolkit be installed. If this feature is not
used, the Traits project does not otherwise require GUI support.)
A class can freely mix trait-based attributes with normal Python
attributes, or can opt to allow the use of only a fixed or open set of
trait attributes within the class. Trait attributes defined by a class
are automatically inherited by any subclass derived from the class.
%prep
%setup -q -n %{module}-%{version}
%build
%__python setup.py build
export PYTHONPATH=`ls -1d build/lib.* | head -1`
%__python setup.py build_docs --formats html
%install
PYTHONDONTWRITEBYTECODE= %__python setup.py install --root=%{buildroot}
%files
%doc *.rst
%{py_platsitedir}/%{module}*