diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 0000000..95cb3ee --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1 @@ +ref-names: $Format:%D$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..00a7b00 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/proxmin/nmf.py b/proxmin/nmf.py index 28615a3..05e6919 100644 --- a/proxmin/nmf.py +++ b/proxmin/nmf.py @@ -61,7 +61,7 @@ def step_pgm(*X, it=None, W=1): step_A, step_S """ A, S = X - if W is 1: + if W == 1: return step_A(A, S), step_S(A, S) else: C, K = A.shape diff --git a/setup.py b/setup.py index 140c8a8..005a401 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,6 @@ -from setuptools import setup +from setuptools import setup, find_packages import os -packages = [] -for root, dirs, files in os.walk('.'): - if not root.startswith('./build') and '__init__.py' in files: - packages.append(root[2:]) - long_description = open('README.md').read() setup( @@ -13,9 +8,9 @@ description = 'Proximal methods for constrained optimization', long_description = long_description, long_description_content_type='text/markdown', - packages = packages, + packages=find_packages(), include_package_data=False, - version = '0.6.9', + use_scm_version=True, license='MIT', author = 'Peter Melchior, Fred Moolekamp', author_email = 'peter.m.melchior@gmail.com', @@ -30,5 +25,6 @@ "Topic :: Scientific/Engineering :: Information Analysis" ], keywords = ['optimization', 'constrained optimization', 'proximal algorithms', 'data analysis', 'non-negative matrix factorization'], - requires=['numpy','scipy'] + setup_requires=['setuptools_scm', 'setuptools_scm_git_archive'], + install_requires=['numpy','scipy'], )