File python-distribute.spec of Package python-distribute

#
# spec file for package python-distribute
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


%define modname distribute
%define mod2nam setuptools
Name:           python-%{modname}
Version:        0.6.49
Release:        1.1
Url:            http://packages.python.org/distribute
Summary:        Easily download, build, install, upgrade, and uninstall Python packages
License:        Python-2.0 or ZPL-2.0
Group:          Development/Languages/Python
Source:         http://pypi.python.org/packages/source/d/%{modname}/%{modname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel >= 2.7
Provides:       python-setuptools = %{version}
Obsoletes:      python-setuptools < %{version}
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch:      noarch
%py_requires
%endif

%description
Distribute is a fork of the Setuptools project.

Distribute is intended to replace Setuptools as the standard method for working
with Python module distributions.

%prep
%setup -q -n %{modname}-%{version}
rm -f %{modname}.egg-info/*.orig
chmod -x {.,docs}/*.txt # Fix executable bits for documentation

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
rm -rf %{buildroot}%{python_sitelib}/%{mod2nam}/tests # Don't install tests
rm -rf %{buildroot}%{python_sitelib}/%{mod2nam}/*.exe # Remove unneeded files

## tests don't work without network access
##%if 0%{?suse_version} <= 1201
##%check
##python setup.py test
##%endif

%files
%defattr(-,root,root,-)
%doc docs/*.txt CHANGES.txt CONTRIBUTORS.txt DEVGUIDE.txt README.txt
%{_bindir}/easy_install
%{_bindir}/easy_install-%{py_ver}
%{python_sitelib}/easy_install.py*
%{python_sitelib}/pkg_resources.py*
%{python_sitelib}/_markerlib/
%{python_sitelib}/%{mod2nam}.pth
%{python_sitelib}/%{mod2nam}/
#%{python_sitelib}/site.py*
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info/
%{python_sitelib}/%{mod2nam}-*-py%{py_ver}.egg-info

%changelog
* Sun Nov 25 2012 alexandre@exatati.com.br
- Update to 0.6.31:
  * Issue #303: Make sure the manifest only ever contains UTF-8 in Python 3.
  * Issue #329: Properly close files created by tests for compatibility with
    Jython.
  * Work around Jython bugs #1980 and #1981.
  * Issue #334: Provide workaround for packages that reference sys.__stdout__
    such as numpy does. This change should address
    virtualenv #359 as long as the system encoding is UTF-8 or the IO encoding
    is specified in the environment, i.e.:
    PYTHONIOENCODING=utf8 pip install numpy
  * Fix for encoding issue when installing from Windows executable on Python 3.
  * Issue #323: Allow `setup_requires` requirements to supercede installed
    requirements. Added some new keyword arguments to existing pkg_resources
    methods. Also had to updated how __path__ is handled for namespace packages
    to ensure that when a new egg distribution containing a namespace package is
    placed on sys.path, the entries in __path__ are found in the same order they
    would have been in had that egg been on the path when pkg_resources was
    first imported.
* Mon Oct 22 2012 alexandre@exatati.com.br
- Update to 0.6.30:
  * Issue #328: Clean up temporary directories in distribute_setup.py.
  * Fix fatal bug in distribute_setup.py.
* Mon Oct 22 2012 alexandre@exatati.com.br
- Update to 0.6.29:
  * Pull Request #14: Honor file permissions in zip files.
  * Issue #327: Merged pull request #24 to fix a dependency problem with pip.
  * Merged pull request #23 to fix https://github.com/pypa/virtualenv/issues/301.
  * If Sphinx is installed, the `upload_docs` command now runs `build_sphinx`
    to produce uploadable documentation.
  * Issue #326: `upload_docs` provided mangled auth credentials under Python 3.
  * Issue #320: Fix check for "createable" in distribute_setup.py.
  * Issue #305: Remove a warning that was triggered during normal operations.
  * Issue #311: Print metadata in UTF-8 independent of platform.
  * Issue #303: Read manifest file with UTF-8 encoding under Python 3.
  * Issue #301: Allow to run tests of namespace packages when using 2to3.
  * Issue #304: Prevent import loop in site.py under Python 3.3.
  * Issue #283: Reenable scanning of *.pyc / *.pyo files on Python 3.3.
  * Issue #299: The develop command didn't work on Python 3, when using 2to3,
    as the egg link would go to the Python 2 source. Linking to the 2to3'd code
    in build/lib makes it work, although you will have to rebuild the module
    before testing it.
  * Issue #306: Even if 2to3 is used, we build in-place under Python 2.
  * Issue #307: Prints the full path when .svn/entries is broken.
  * Issue #313: Support for sdist subcommands (Python 2.7)
  * Issue #314: test_local_index() would fail an OS X.
  * Issue #310: Non-ascii characters in a namespace __init__.py causes errors.
  * Issue #218: Improved documentation on behavior of `package_data` and
    `include_package_data`. Files indicated by `package_data` are now included
    in the manifest.
  * `distribute_setup.py` now allows a `--download-base` argument for retrieving
    distribute from a specified location.
* Mon Jul 23 2012 alexandre@exatati.com.br
- Update to 0.6.28:
  * Issue 294: setup.py can now be invoked from any directory.
  * Scripts are now installed honoring the umask.
  * Added support for .dist-info directories.
  * Issue #283 bdist_egg issues with python 3.3.0aX.
  * Test and fix for marshal.load of .pyc files on Python 3.3.
* Sun May 27 2012 toddrme2178@gmail.com
- Improved openSUSE 11.4 fix
- Cleaned up spec file formatting
- Added proper source to python 3 version
* Fri May 18 2012 alexandre@exatati.com.br
- Disabled tests, it will fail for all distros, requires network
  access.
* Fri May 18 2012 alexandre@exatati.com.br
- Update to 0.6.27:
  * Support current snapshots of CPython 3.3.
  * Distribute now recognizes README.rst as a standard, default readme
    file.
  * Exclude 'encodings' modules when removing modules from sys.modules.
    Workaround for #285.
  * Issue #231: Don't fiddle with system python when used with buildout
    (bootstrap.py)
- Disable tests broken in openSUSE <= 12.1.
* Fri May 18 2012 toddrme2178@gmail.com
- Disable tests broken in openSUSE 12.2
* Fri Apr 27 2012 toddrme2178@gmail.com
- Fix building python 3 package on openSUSE 11.4 x86_64
* Mon Apr 23 2012 toddrme2178@gmail.com
- Disable non-functional tests on python 3
- Fix building python 3 version on openSUSE 11.4
* Sun Apr  8 2012 alexandre@exatati.com.br
- Update to 0.6.26:
  * Issue #183: Symlinked files are now extracted from source distributions.
  * Issue #227: Easy_install fetch parameters are now passed during the
    installation of a source distribution; now fulfillment of setup_requires
    dependencies will honor the parameters passed to easy_install.
* Sat Mar 10 2012 alexandre@exatati.com.br
- Update to 0.6.25:
  - Issue #258: Workaround a cache issue
  - Issue #260: distribute_setup.py now accepts the --user
    parameter for Python 2.6 and later.
  - Issue #262: package_index.open_with_auth no longer throws
    LookupError on Python 3.
  - Issue #269: AttributeError when an exception occurs reading
    Manifest.in on late releases of Python.
  - Issue #272: Prevent TypeError when namespace package names
    are unicode and single-install-externally-managed is used. Also
    fixes PIP issue 449.
  - Issue #273: Legacy script launchers now install with Python2/3
    support.
* Mon Feb 20 2012 saschpe@suse.de
- Set license to SDPX style
- Remove *.exe files from sitelib
* Mon Oct 17 2011 alexandre@exatati.com.br
- Update to 0.6.24:
  - Issue #249: Added options to exclude 2to3 fixers.
- Aditional changes from 0.6.23:
  - Issue #244: Fixed a test
  - Issue #243: Fixed a test
  - Issue #239: Fixed a test
  - Issue #240: Fixed a test
  - Issue #241: Fixed a test
  - Issue #237: Fixed a test
  - Issue #238: easy_install now uses 64bit executable wrappers on 64bit Python
  - Issue #208: Fixed parsed_versions, it now honors post-releases as noted in
    the documentation
  - Issue #207: Windows cli and gui wrappers pass CTRL-C to child python process
  - Issue #227: easy_install now passes its arguments to setup.py bdist_egg
  - Issue #225: Fixed a NameError on Python 2.5, 2.4.
* Mon Sep 26 2011 saschpe@suse.de
- Added 'Conflicts: python-setuptools'
* Tue Sep 20 2011 saschpe@suse.de
- Update to version 0.6.21:
  * Issue #225: FIxed a regression on py2.4
- Changes from version 0.6.20:
  * Issue #135: Include url in warning when processing URLs in package_index.
  * Issue #212: Fix issue where easy_instal fails on Python 3 on windows installer.
  * Issue #213: Fix typo in documentation.
- Spec file changes:
  * Run testsuite
* Mon Jun  6 2011 pascal.bleser@opensuse.org
- exclude tests
* Thu Jun  2 2011 alexandre@exatati.com.br
- Update to 0.6.19:
  - Issue 206: AttributeError: 'HTTPMessage' object has no attribute
    'getheaders'
- Aditional changes from 0.6.18:
  - Issue 210: Fixed a regression introduced by Issue 204 fix.
* Mon May 30 2011 alexandre@exatati.com.br
- Update to 0.6.17:
  * Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment
    variable to allow to disable installation of easy_install-${version} script.
  * Support Python >=3.1.4 and >=3.2.1.
  * Issue 204: Don't try to import the parent of a namespace package in
    declare_namespace
  * Issue 196: Tolerate responses with multiple Content-Length headers
  * Issue 205: Sandboxing doesn't preserve working_set. Leads to setup_requires
    problems.
* Sat Apr 30 2011 alexandre@exatati.com.br
- Update to 0.6.16:
  * Builds sdist gztar even on Windows (avoiding Issue 193).
  * Issue 192: Fixed metadata omitted on Windows when package_dir
    specified with forward-slash.
  * Issue 195: Cython build support.
  * Issue 200: Issues with recognizing 64-bit packages on Windows.
  Aditional changes from 0.6.15:
  * Fixed typo in bdist_egg
  * Several issues under Python 3 has been solved.
  * Issue 146: Fixed missing DLL files after easy_install of windows
    exe package.
* Tue Apr 26 2011 saschpe@gmx.de
- Spec file cleanup:
  - Removed authors from description
  - Obsoletes/Provides setuptools version fixed
  - %%py_requires available only on SUSE distros
* Mon Aug 30 2010 jfunk@funktronics.ca
- Update to 0.6.14
- Provide and obsolete python-setuptools to fix bnc#632805
* Fri May  7 2010 alexandre@exatati.com.br
- Update to 0.6.12;
- Spec file cleaned with spec-cleaner.
* Mon Dec 14 2009 alexandre@exatati.com.br
- Update to 0.6.10.
* Tue Nov 10 2009 jfunk@funktronics.ca
- Initial release
openSUSE Build Service is sponsored by