Commit 9873112c authored by Ole Streicher's avatar Ole Streicher

New upstream version 0.5

parent 22d27611
This diff is collapsed.
* Code: https://github.com/gammapy/gammapy
* Docs: https://gammapy.readthedocs.org/
* Docs: http://docs.gammapy.org/
**Gammapy** is an open source (BSD licensed) gamma-ray astronomy Python package.
......
Metadata-Version: 1.1
Name: gammapy
Version: 0.3
Version: 0.5
Summary: A Python package for gamma-ray astronomy
Home-page: https://github.com/gammapy/gammapy
Author: The Gammapy developers
Author-email: gammapy@gmail.com
Author-email: gammapy@googlegroups.com
License: BSD
Description:
* Code: https://github.com/gammapy/gammapy
* Docs: https://gammapy.readthedocs.org/
* Docs: http://docs.gammapy.org/
**Gammapy** is an open source (BSD licensed) gamma-ray astronomy Python package.
......@@ -29,8 +29,8 @@ Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Development Status :: 3 - Alpha
......@@ -4,11 +4,17 @@ Gammapy
A Python Package for Gamma-ray Astronomy.
* Code: https://github.com/gammapy/gammapy
* Docs: https://gammapy.readthedocs.org/
* Docs: http://docs.gammapy.org/
* License: BSD-3
.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org/
Try Gammapy online in the browser via http://mybinder.org/ :
.. image:: http://mybinder.org/badge.svg
:target: http://mybinder.org/repo/gammapy/gammapy-extra
Status shields
++++++++++++++
......@@ -31,26 +37,13 @@ Status shields
:alt: Benchmarks
* .. image:: https://readthedocs.org/projects/gammapy/badge/?version=latest
:target: https://readthedocs.org/projects/gammapy/?badge=latest
:target: http://docs.gammapy.org/en/latest/
:alt: Documentation Status
* .. image:: http://img.shields.io/pypi/l/gammapy.svg
:target: https://pypi.python.org/pypi/gammapy/
:alt: License
* .. image:: https://pypip.in/status/gammapy/badge.svg
:target: https://pypi.python.org/pypi/gammapy/
:alt: Development Status
* .. image:: http://img.shields.io/pypi/v/gammapy.svg?text=version
:target: https://pypi.python.org/pypi/gammapy/
:alt: Latest release
* .. image:: http://img.shields.io/pypi/dm/gammapy.svg
:target: https://pypi.python.org/pypi/gammapy/
:alt: Downloads per month
* .. image:: https://pypip.in/py_versions/gammapy/badge.svg
:target: https://pypi.python.org/pypi/gammapy/
:alt: Supported Python versions
......@@ -409,7 +409,7 @@ class _Bootstrapper(object):
def get_index_dist(self):
if not self.download:
log.warn('Downloading {0!r} disabled.'.format(DIST_NAME))
return False
return None
log.warn(
"Downloading {0!r}; run setup.py with the --offline option to "
......
......@@ -7,43 +7,54 @@ os:
- osx
- linux
# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false
# The apt packages below are needed for sphinx builds, which can no longer
# be installed with sudo apt-get.
addons:
apt:
packages:
- graphviz
env:
matrix:
- PYTHON_VERSION=2.6
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.3
- PYTHON_VERSION=3.4
- PYTHON_VERSION=3.5
global:
- SETUPTOOLS_VERSION=stable
- CONDA_DEPENDENCIES="setuptools pytest sphinx cython numpy"
- PIP_DEPENDENCIES="coveralls pytest-cov"
matrix:
include:
- os: linux
env: PYTHON_VERSION=2.7 SETUPTOOLS_VERSION=dev
before_install:
- os: linux
env: PYTHON_VERSION=2.7 SETUPTOOLS_VERSION=20
# Use utf8 encoding. Should be default, but this is insurance against
# future changes
- export PYTHONIOENCODING=UTF8
- os: linux
env: PYTHON_VERSION=2.7 SETUPTOOLS_VERSION=dev DEBUG=True
CONDA_DEPENDENCIES='pytest sphinx cython numpy'
# Install conda
- source continuous-integration/travis/install_conda_$TRAVIS_OS_NAME.sh
allow_failures:
- os: linux
env: PYTHON_VERSION=2.7 SETUPTOOLS_VERSION=dev DEBUG=True
CONDA_DEPENDENCIES='pytest sphinx cython numpy'
# Install graphviz
- source continuous-integration/travis/install_graphviz_$TRAVIS_OS_NAME.sh
before_install:
- if [[ $TRAVIS_OS_NAME == osx ]]; then brew update; brew install graphviz; fi
install:
- conda create --yes -n test python=$PYTHON_VERSION
- source activate test
- conda install --yes pip "pytest<2.6" sphinx cython numpy
- pip install coveralls pytest-cov
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
# We cannot install the developer version of setuptools using pip because
# pip tries to remove the previous version of setuptools before the
# installation is complete, which causes issues. Instead, we just install
# setuptools manually.
- if [[ $SETUPTOOLS_VERSION == dev ]]; then conda install --yes mercurial mock; fi
- if [[ $SETUPTOOLS_VERSION == dev ]]; then hg clone https://bitbucket.org/pypa/setuptools; cd setuptools; python setup.py install; cd ..; fi
- if [[ $SETUPTOOLS_VERSION == dev ]]; then git clone http://github.com/pypa/setuptools.git; cd setuptools; python setup.py install; cd ..; fi
before_script:
# Some of the tests use git commands that require a user to be configured
......@@ -51,7 +62,8 @@ before_script:
- git config --global user.email "author@example.com"
script:
- py.test --cov astropy_helpers astropy_helpers
# Use full path for coveragerc; see issue #193
- py.test --cov astropy_helpers --cov-config $(pwd)/astropy_helpers/tests/coveragerc astropy_helpers
after_success:
- coveralls
astropy-helpers Changelog
=========================
1.2 (2016-06-19)
----------------
- Added sphinx configuration value ``automodsumm_inherited_members``.
If ``True`` this will include members that are inherited from a base
class in the generated API docs. Defaults to ``False`` which matches
the previous behavior. [#215]
- Fixed ``build_sphinx`` to recognize builds that succeeded but have output
*after* the "build succeeded." statement. This only applies when
``--warnings-returncode`` is given (which is primarily relevant for Travis
documentation builds). [#223]
- Fixed ``build_sphinx`` the sphinx extensions to not output a spurious warning
for sphinx versions > 1.4. [#229]
- Add Python version dependent local sphinx inventories that contain
otherwise missing references. [#216]
- ``astropy_helpers`` now require Sphinx 1.3 or later. [#226]
1.1.2 (2016-03-9)
-----------------
- The CSS for the sphinx documentation was altered to prevent some text overflow
problems. [#217]
1.1.1 (2015-12-23)
------------------
- Fixed crash in build with ``AttributeError: cython_create_listing`` with
older versions of setuptools. [#209]
1.1 (2015-12-10)
----------------
- The original ``AstropyTest`` class in ``astropy_helpers``, which implements
the ``setup.py test`` command, is deprecated in favor of moving the
implementation of that command closer to the actual Astropy test runner in
``astropy.tests``. Now a dummy ``test`` command is provided solely for
informing users that they need ``astropy`` installed to run the tests
(however, the previous, now deprecated implementation is still provided and
continues to work with older versions of Astropy). See the related issue for
more details. [#184]
- Added a useful new utility function to ``astropy_helpers.utils`` called
``find_data_files``. This is similar to the ``find_packages`` function in
setuptools in that it can be used to search a package for data files
(matching a pattern) that can be passed to the ``package_data`` argument for
``setup()``. See the docstring to ``astropy_helpers.utils.find_data_files``
for more details. [#42]
- The ``astropy_helpers`` module now sets the global ``_ASTROPY_SETUP_``
flag upon import (from within a ``setup.py``) script, so it's not necessary
to have this in the ``setup.py`` script explicitly. If in doubt though,
there's no harm in setting it twice. Putting it in ``astropy_helpers``
just ensures that any other imports that occur during build will have this
flag set. [#191]
- It is now possible to use Cython as a ``setup_requires`` build requirement,
and still build Cython extensions even if Cython wasn't available at the
beginning of the build processes (that is, is automatically downloaded via
setuptools' processing of ``setup_requires``). [#185]
- Moves the ``adjust_compiler`` check into the ``build_ext`` command itself,
so it's only used when actually building extension modules. This also
deprecates the stand-alone ``adjust_compiler`` function. [#76]
- When running the ``build_sphinx`` / ``build_docs`` command with the ``-w``
option, the output from Sphinx is streamed as it runs instead of silently
buffering until the doc build is complete. [#197]
1.0.7 (2016-06-09)
------------------
- Fix missing import in ``astropy_helpers/utils.py``. [#196]
1.0.6 (2015-12-04)
------------------
- Fixed bug where running ``./setup.py build_sphinx`` could return successfully
even when the build was not successful (and should have returned a non-zero
error code). [#199]
1.0.5 (2015-10-02)
------------------
- Fixed a regression in the ``./setup.py test`` command that was introduced in
v1.0.4.
1.0.4 (2015-10-02)
------------------
- Fixed issue with the sphinx documentation css where the line numbers for code
blocks were not aligned with the code. [#179]
- Fixed crash that could occur when trying to build Cython extension modules
when Cython isn't installed. Normally this still results in a failed build,
but was supposed to provide a useful error message rather than crash
outright (this was a regression introduced in v1.0.3). [#181]
- Fixed a crash that could occur on Python 3 when a working C compiler isn't
found. [#182]
- Quieted warnings about deprecated Numpy API in Cython extensions, when
building Cython extensions against Numpy >= 1.7. [#183]
- Improved support for py.test >= 2.7--running the ``./setup.py test`` command
now copies all doc pages into the temporary test directory as well, so that
all test files have a "common root directory". [#189]
1.0.3 (2015-07-22)
------------------
......@@ -43,23 +159,11 @@ astropy-helpers Changelog
and to return more info. This will help fix builds of Astropy on less
common compilers, like Sun C. [#153]
1.0.1 (2015-03-04)
------------------
- Released in concert with v0.4.8 to address the same issues.
- Improved the ``ah_bootstrap`` script's ability to override existing
installations of astropy-helpers with new versions in the context of
installing multiple packages simultaneously within the same Python
interpreter (e.g. when one package has in its ``setup_requires`` another
package that uses a different version of astropy-helpers. [#144]
- Added a workaround to an issue in matplotlib that can, in rare cases, lead
to a crash when installing packages that import matplotlib at build time.
[#144]
0.4.8 (2015-03-04)
------------------
......@@ -73,7 +177,6 @@ astropy-helpers Changelog
to a crash when installing packages that import matplotlib at build time.
[#144]
1.0 (2015-02-17)
----------------
......
include README.rst
include CHANGES.rst
include LICENSE.rst
recursive-include licenses *
include ez_setup.py
include ah_bootstrap.py
......
......@@ -25,8 +25,8 @@ For examples of how to implement ``astropy-helpers`` in a project,
see the ``setup.py`` and ``setup.cfg`` files of the
`Affiliated package template <https://github.com/astropy/package-template>`_.
.. image:: https://travis-ci.org/astropy/astropy-helpers.png
.. image:: https://travis-ci.org/astropy/astropy-helpers.svg
:target: https://travis-ci.org/astropy/astropy-helpers
.. image:: https://coveralls.io/repos/astropy/astropy-helpers/badge.png
.. image:: https://coveralls.io/repos/astropy/astropy-helpers/badge.svg
:target: https://coveralls.io/r/astropy/astropy-helpers
......@@ -409,7 +409,7 @@ class _Bootstrapper(object):
def get_index_dist(self):
if not self.download:
log.warn('Downloading {0!r} disabled.'.format(DIST_NAME))
return False
return None
log.warn(
"Downloading {0!r}; run setup.py with the --offline option to "
......
......@@ -5,44 +5,41 @@ environment:
global:
PYTHON: "C:\\conda"
MINICONDA_VERSION: "3.5.5"
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\continuous-integration\\appveyor\\windows_sdk.cmd"
MINICONDA_VERSION: "latest"
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd"
PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix
# of 32 bit and 64 bit builds are needed, move this
# to the matrix section.
# babel 2.0 is known to break on Windows:
# https://github.com/python-babel/babel/issues/174
CONDA_DEPENDENCIES: "numpy Cython sphinx pytest babel!=2.0"
matrix:
- PYTHON_VERSION: "2.6"
- PYTHON_VERSION: "2.7"
- PYTHON_VERSION: "3.3"
- PYTHON_VERSION: "3.4"
- PYTHON_VERSION: "3.5"
platform:
-x64
install:
# Install miniconda using a powershell script.
- "powershell continuous-integration/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Install the build and runtime dependencies of the project.
- "conda update --yes conda"
# Create a conda environment
- "conda create -q --yes -n test python=%PYTHON_VERSION%"
# Set up ci-helpers
- "git clone git://github.com/astropy/ci-helpers.git"
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"
# Check that we have the expected version of Python
- "python --version"
# Install specified version of numpy and dependencies
- "conda install -q --yes numpy Cython sphinx pytest"
# Some of the tests use git commands that require a user to be configured
- git config --global user.name "A U Thor"
- git config --global user.email "author@example.com"
# Install graphviz
- cinst graphviz.portable
# For now we skip the installation of the graphviz package because the
# graphviz.org website seems to be unresponsive intermittently, which
# causes timeouts in downloads.
# - cinst graphviz.portable
# Not a .NET project, we build SunPy in the install step instead
build: false
......
......@@ -33,3 +33,20 @@ try:
except:
# Ignore if this fails for *any* reason*
pass
import os
# Ensure that all module-level code in astropy or other packages know that
# we're in setup mode:
if ('__main__' in sys.modules and
hasattr(sys.modules['__main__'], '__file__')):
filename = os.path.basename(sys.modules['__main__'].__file__)
if filename.rstrip('co') == 'setup.py':
if sys.version_info[0] >= 3:
import builtins
else:
import __builtin__ as builtins
builtins._ASTROPY_SETUP_ = True
del filename
"""
Provides a base class for a 'dummy' setup.py command that has no functionality
(probably due to a missing requirement). This dummy command can raise an
exception when it is run, explaining to the user what dependencies must be met
to use this command.