Skip to content

Commit

Permalink
Add simple setup.py so pkg can be used more easily
Browse files Browse the repository at this point in the history
  • Loading branch information
dkirkby committed Jan 22, 2018
1 parent 3a4d6c1 commit 0e5f32b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
4 changes: 4 additions & 0 deletions descwl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
photometric redshift algorithms, and deblending algorithms.
"""

__author__ = 'WeakLensingDeblending developers'
__email__ = '[email protected]'
__version__ = '0.3dev'

from . import catalog
from . import survey
from . import model
Expand Down
7 changes: 6 additions & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ You can update your local copy of the package at any time using::
Getting Started
---------------

Programs can be run directly from the top-level directory without needing to set `PYTHONPATH` as long as you have the required packages already installed, e.g.::
Programs can be run directly from the top-level directory (without needing to install the package or otherwise set `PYTHONPATH`) as long as you have the required packages (listed below) already installed, e.g.::

cd WeakLensingDeblending
./simulate.py --help

For an introduction to the available programs, see :doc:`here </programs>` and for examples of running these programs see :doc:`here </examples>`.

If you would like to call code in the `descwl` module, you can also install the package using the following command from the top-level directory::

pip install .

Required Packages
-----------------

Expand All @@ -42,6 +46,7 @@ The following python packages are required by this package:
* `fitsio <https://github.com/esheldon/fitsio>`_ (version >= 0.9.6)
* `galsim <https://github.com/GalSim-developers/GalSim>`_ (version >= 1.2)
* `lmfit <http://cars9.uchicago.edu/software/python/lmfit/>`_ (version >= 0.8.3)
* `six` used for python 2/3 compatibility.

Note that `numpy` and `astropy` are both available in recent `anaconda <https://store.continuum.io/cshop/anaconda/>`_ or `enthought canopy <https://www.enthought.com/products/canopy/>`_ distributions. The `fitsio` package is required for performance reasons, since the similar pure-python functionality in the :mod:`astropy.io.fits` module is too slow for this application. Installing GalSim is a more involved process, but well worth the effort. The `lmfit` package is only required if you will be running your own simulations.

Expand Down
32 changes: 32 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup

requirements = [
'fitsio',
'galsim',
'numpy',
'astropy',
'lmfit',
'six'
]

setup(
name='descwl',
version='0.3dev',
description='Weak lensing fast simulations and analysis for the LSST DESC',
long_description='Weak lensing fast simulations and analysis for the LSST DESC',
author='descwl developers',
author_email='[email protected]',
url='https://github.com/LSSTDESC/WeakLensingDeblending',
packages=[
'descwl',
],
package_dir={'descwl': 'descwl'},
scripts = [ ],
#include_package_data=True,
#zip_safe=False,
install_requires=[ ], #requirements,
license='MIT',
)

0 comments on commit 0e5f32b

Please sign in to comment.