Skip to content
This repository was archived by the owner on Jun 5, 2018. It is now read-only.

Commit b036ebd

Browse files
author
Allen Riddell
committed
Include missing BayesLogit headers
1 parent a9cf84d commit b036ebd

File tree

5 files changed

+29
-19
lines changed

5 files changed

+29
-19
lines changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ global-exclude *.so
88
global-exclude *.pyc
99
global-exclude .git*
1010
global-exclude *.png
11+
12+
# Exclude .R files in BayesLogit
13+
global-exclude *.R

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
horizont: Dynamic topic models
2-
==============================
1+
horizont: Topic models in Python
2+
================================
33

44
.. image:: https://travis-ci.org/ariddell/horizont.png
55
:target: https://travis-ci.org/ariddell/horizont

horizont/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
logger.addHandler(logging.NullHandler())
1111

1212
# following PEP 386
13-
__version__ = "0.0.4"
13+
__version__ = "0.0.5"

horizont/_random.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# distutils: language = c++
2+
#cython: language_level=3
3+
#cython: boundscheck=False
4+
#cython: wraparound=False
5+
26
from cython.operator cimport dereference as deref
37
from libc.math cimport sqrt
48

setup.py

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-----------------------------------------------------------------------------
2-
# Copyright (c) 2013, Allen B. Riddell
2+
# Copyright (c) 2013-2014, Allen B. Riddell
33
#
44
# This file is licensed under Version 3.0 of the GNU General Public
55
# License. See LICENSE for a text of the license.
@@ -71,22 +71,16 @@ def find_version(*parts):
7171
cython = False
7272

7373

74-
# use CheckSDist strategy from pandas
7574
class CheckSDist(sdist):
7675
"""Custom sdist that ensures Cython has compiled all pyx files to c."""
7776

78-
_pyxfiles = ['horizont/_lda.pyx']
79-
8077
def initialize_options(self):
8178
sdist.initialize_options(self)
82-
83-
'''
84-
self._pyxfiles = []
85-
for root, dirs, files in os.walk('pandas'):
86-
for f in files:
87-
if f.endswith('.pyx'):
88-
self._pyxfiles.append(pjoin(root, f))
89-
'''
79+
self._pyxfiles = []
80+
for root, dirs, files in os.walk('horizont'):
81+
for f in files:
82+
if f.endswith('.pyx'):
83+
self._pyxfiles.append(os.path.join(root, f))
9084

9185
def run(self):
9286
if 'cython' in cmdclass:
@@ -115,9 +109,7 @@ def run(self):
115109

116110
include_gsl_dir = os.environ.get('GSL_INC_DIR', "/usr/include/")
117111
lib_gsl_dir = os.environ.get('GSL_LIB_DIR', "/usr/lib/")
118-
random_include_dirs = ["horizont/BayesLogit/Code/C",
119-
"horizont/RNG",
120-
include_gsl_dir]
112+
random_include_dirs = ["horizont/BayesLogit/Code/C", "horizont/RNG", include_gsl_dir]
121113
random_library_dirs = [lib_gsl_dir]
122114
random_libraries = ['gsl', 'gslcblas']
123115

@@ -147,6 +139,17 @@ def run(self):
147139
import numpy
148140
include_dirs = [numpy.get_include()]
149141

142+
# package data
143+
package_data_pats = ['*.hpp', '*.pxd', '*.pyx', 'tests/*.dat', 'tests/*.ldac']
144+
145+
# get every file under horizont/BayesLogit/Code/C/", "horizont/RNG/"
146+
package_data_pats += sum(
147+
[[os.path.join(path.replace('horizont/', ''), fn) for fn in files]
148+
for path, dirs, files in os.walk('horizont/BayesLogit/Code/C/')], [])
149+
150+
package_data_pats += sum(
151+
[[os.path.join(path.replace('horizont/', ''), fn) for fn in files]
152+
for path, dirs, files in os.walk('horizont/RNG/')], [])
150153

151154
###########################################################################
152155
# Setup proper
@@ -165,5 +168,5 @@ def run(self):
165168
classifiers=CLASSIFIERS,
166169
ext_modules=extensions,
167170
include_dirs=include_dirs,
168-
package_data={'horizont.tests': ['ap.dat', 'ch.ldac']},
171+
package_data={'horizont' : package_data_pats},
169172
platforms='any')

0 commit comments

Comments
 (0)