Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37910173
en ru br
Репозитории ALT
5.1: 3.2.1-alt1.svn20090929.1
www.altlinux.org/Changes

Группа :: Разработка/Python
Пакет: python-module-traits

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define oname traits
Name:           python-module-traits
Version:        3.2.1
Release:        alt1.svn20090929.1
Summary:        Explicitly typed attributes for Python

Group:          Development/Python
# Images have different licenses. For image license breakdown check
# image_LICENSE.txt file. Except enthought/traits/ui/editors_gen.py
# which is GPLv2+ all remaining source or image files are in BSD
# 3-clause license. Confirmed from upstream.
License:        BSD and EPL and LGPLv2 and GPLv2+
URL:            http://code.enthought.com/projects/traits/
Source0:        http://pypi.python.org/packages/source/T/Traits/Traits-%version.tar.gz
Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org>

BuildRequires:  python-module-setuptools, python-module-numpy, python-devel

%description
The traits package developed by Enthought provides a special type
definition called a trait. Although they can be used as normal Python object
attributes, traits also have several additional characteristics:

* Initialization: A trait can be assigned a default value.
* Validation: A trait attribute's type can be explicitly declared.
* Delegation: The value of a trait attribute can be contained either
 in another object.
* Notification: Setting the value of a trait attribute can trigger
 notification of other parts of the program.
* Visualization: User interfaces that permit the interactive
 modification of a trait's value can be automatically constructed
 using the trait's definition.

%package doc
Summary: Documentation for Traits, explicitly typed attributes for Python
Group: Development/Documentation
BuildArch: noarch

%description doc
The traits package developed by Enthought provides a special type
definition called a trait. This package contains development
documentation for it.

%prep
%setup -q -n Traits-%version

# fix wrong-file-end-of-line-encoding

find examples \( -type f -o -name '*py' \
-o -name '*desc' -o -name '*txt' \) -print \
| sed 's/\ /\\ /g' | xargs sed -i 's/\r//'
ls *txt | sed 's/\ /\\ /g' | xargs sed -i 's/\r//'
sed -i 's/\r//' enthought/traits/protocols/unused_setup

# scripts having 644 permission

chmod 755 enthought/traits/protocols/unused_setup
chmod 755 enthought/traits/ui/unused_setup

# file not utf-8

iconv -f iso8859-1 -t utf-8 image_LICENSE_Eclipse.txt \
> image_LICENSE_Eclipse.txt.conv && mv -f \
image_LICENSE_Eclipse.txt.conv image_LICENSE_Eclipse.txt

%build
export CFLAGS="%optflags -fno-strict-aliasing"
python%__python_version setup.py release build

%install
%python_install -O1
sed -i 's/\.dev$//g' \
%buildroot/%python_sitelibdir/Traits-%version-*.egg-info/requires.txt

rm %buildroot/%python_sitelibdir/enthought/traits/protocols/_speedups.c
rm %buildroot/%python_sitelibdir/enthought/traits/ctraits.c

# Prevents non standard permissions

chmod 755 %buildroot/%python_sitelibdir/enthought/traits/protocols/_speedups.so
chmod 755 %buildroot/%python_sitelibdir/enthought/traits/ctraits.so

%files
%doc *.txt
%python_sitelibdir/*

%files doc
%doc examples docs/*.pdf build/docs/html

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin