Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include README.md
include CHANGES*
include LICENSE.txt
include versioneer.py
include apstools/_version.py
include versioneer.py
include apstools/_version.py
9 changes: 6 additions & 3 deletions apstools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#-----------------------------------------------------------------------------
# :author: Pete R. Jemian
# :email: [email protected]
Expand All @@ -21,12 +20,16 @@
__license__ += u" (see LICENSE.txt file for details)"
__platforms__ = 'any'
__zip_safe__ = False
__exclude_project_dirs__ = "docs examples tests".split()
__python_version_required__ = ">=3.5"

__package_name__ = __project__
__long_description__ = __description__

__install_requires__ = ('databroker', 'pandas', 'xlrd')
__install_requires__ = () # TODO: for conda build now
from ._requirements import learn_requirements
__install_requires__ = learn_requirements()
del learn_requirements

__classifiers__ = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
Expand Down
38 changes: 38 additions & 0 deletions apstools/_requirements.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#-----------------------------------------------------------------------------
# :author: Pete R. Jemian
# :email: [email protected]
# :copyright: (c) 2017-2019, UChicago Argonne, LLC
#
# Distributed under the terms of the Creative Commons Attribution 4.0 International Public License.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-----------------------------------------------------------------------------



def learn_requirements():
"""
list all installation requirements

ALL packages & version restrictions stated in requirements.txt
"""
req_file = 'requirements.txt'
reqs = []

import os
path = os.path.dirname(__file__)
req_file = os.path.join(path, '..', req_file)
if not os.path.exists(req_file):
# not needed with installed package
return reqs

excludes = "versioneer coveralls coverage".split()
with open(req_file, 'r') as fp:
buf = fp.read().strip().splitlines()
for req in buf:
req = req.strip()
if req != "" \
and not req.startswith('#') \
and req not in excludes:
reqs.append(req)
return reqs
13 changes: 4 additions & 9 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package:
version: "{{ version }}"

build:
script: python setup.py install
script: python -m pip install --no-deps --ignore-installed .
noarch: python
entry_points:
- apstools_plan_catalog = apstools.examples:main
Expand All @@ -32,19 +32,14 @@ build:

requirements:
host:
- pip
- python
- ophyd
- databroker
- bluesky
- pyRestTable
- pandas
- xlrd
- pip
run:
- python
- ophyd
- databroker
- databroker[all]
- bluesky
- historydict
- pyRestTable
- pandas
- xlrd
Expand Down
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
versioneer
coverage
coveralls
pyRestTable
bluesky
databroker[all]
historydict
ophyd
pandas
pyRestTable
xlrd
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@
install_requires = package.__install_requires__,
name = package.__project__,
#platforms = package.__platforms__,
packages = find_packages(exclude=['docs',
'examples', 'tests']),
packages = find_packages(exclude=package.__exclude_project_dirs__),
url = package.__url__,
version = versioneer.get_version(),
cmdclass = versioneer.get_cmdclass(),
zip_safe = package.__zip_safe__,
python_requires = '>=3.5',
python_requires = package.__python_version_required__,
)