diff --git a/greedy/__init__.py b/greedy/__init__.py index 28f08ff..8941128 100644 --- a/greedy/__init__.py +++ b/greedy/__init__.py @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +__version__ = '0.1.2' + from greedy.sampler import * import greedy.sampler from greedy.composite import * import greedy.composite -from greedy.package_info import __version__ import greedy.package_info diff --git a/greedy/package_info.py b/greedy/package_info.py index 0b8ea3e..34d8176 100644 --- a/greedy/package_info.py +++ b/greedy/package_info.py @@ -12,11 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +from greedy import __version__ + +# keep in sync with setup.cfg __package_name__ = 'dwave-greedy' __title__ = 'D-Wave Greedy' -__version__ = '0.1.2' __author__ = 'D-Wave Systems Inc.' -__author_email__ = 'radomir@dwavesys.com' +__author_email__ = 'tools@dwavesys.com' __description__ = 'Ocean-compatible collection of greedy/brute-force solvers/samplers' __url__ = 'https://github.com/dwavesystems/dwave-greedy' __license__ = 'Apache 2.0' diff --git a/setup.cfg b/setup.cfg index a19bc41..d2c8036 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,51 @@ [metadata] -license-file = LICENSE -description-file = README.rst +name = dwave-greedy +version = attr: greedy.__version__ +description = Ocean-compatible collection of greedy/brute-force solvers/samplers +long_description = file: README.rst +long_description_content_type = text/x-rst +license = Apache 2.0 +license_file = LICENSE +copyright = 2019, D-Wave Systems Inc. +author = D-Wave Systems Inc. +author_email = tools@dwavesys.com +url = https://github.com/dwavesystems/dwave-greedy +project_urls = + Documentation = https://docs.ocean.dwavesys.com/en/stable/docs_greedy/sdk_index.html + Issue Tracker = https://github.com/dwavesystems/dwave-greedy/issues/ + Source Code = https://github.com/dwavesystems/dwave-greedy/ +classifiers = + License :: OSI Approved :: Apache Software License + Operating System :: OS Independent + Development Status :: 4 - Beta + Programming Language :: Python :: 3 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: Implementation :: CPython + +[options] +packages = greedy +zip_safe = false +include_package_data = true +python_requires = >=3.6 +install_requires = + numpy>=1.16.0,<2.0.0 + dimod>=0.9.2,<0.10.0 + +# keep in sync with {tests,docs}/requirements.txt +[options.extras_require] +test = + coverage + codecov + parameterized + dwave-system>=1.0.0 +docs = + sphinx>=4.0.0,<5.0.0 + sphinx_rtd_theme + recommonmark + +[aliases] +dists = clean --all sdist bdist_wheel diff --git a/setup.py b/setup.py index 3d1a710..646849c 100644 --- a/setup.py +++ b/setup.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os - from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from Cython.Build import cythonize @@ -48,57 +46,13 @@ def build_extensions(self): super().build_extensions() -# Load package info, without importing the package -basedir = os.path.dirname(os.path.abspath(__file__)) -package_info_path = os.path.join(basedir, "greedy", "package_info.py") -package_info = {} -with open(package_info_path, encoding='utf-8') as f: - exec(f.read(), package_info) - -packages = ['greedy'] - -# Package requirements, minimal pinning -install_requires = ['numpy>=1.16.0,<2.0.0', 'dimod>=0.9.2,<0.10.0'] - -# Package extras requirements -extras_require = { - 'test': ['coverage', 'mock', 'parameterized', 'dwave-system>=1.0.0'], -} - extensions = [Extension( name='greedy.descent', sources=['greedy/descent.pyx'], include_dirs=[numpy.get_include()] )] -classifiers = [ - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: OS Independent', - 'Development Status :: 3 - Alpha', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', -] - -python_requires = '>=3.6' - setup( - name=package_info['__package_name__'], - version=package_info['__version__'], - author=package_info['__author__'], - author_email=package_info['__author_email__'], - description=package_info['__description__'], - long_description=open('README.rst', encoding='utf-8').read(), - url=package_info['__url__'], - license=package_info['__license__'], - packages=packages, - python_requires=python_requires, - install_requires=install_requires, - extras_require=extras_require, ext_modules=cythonize(extensions), cmdclass={'build_ext': build_ext_with_args}, - classifiers=classifiers, - zip_safe=False, ) diff --git a/tests/requirements.txt b/tests/requirements.txt index 520550c..74236bd 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,3 @@ -mock coverage codecov parameterized