Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pyct for openSUSE:Factory checked in at 2022-08-22 11:05:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyct (Old) and /work/SRC/openSUSE:Factory/.python-pyct.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyct" Mon Aug 22 11:05:05 2022 rev:3 rq:998565 version:0.4.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyct/python-pyct.changes 2019-01-08 12:28:25.460275719 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyct.new.2083/python-pyct.changes 2022-08-22 11:05:11.189708634 +0200 @@ -1,0 +2,17 @@ +Sun Aug 21 15:27:06 UTC 2022 - Arun Persaud <[email protected]> + +- specfile: + * update copyright year + * be more specific in %files section + * remove python-devel requirement + * use update-alternative to install binary + +- update to version 0.4.8: + * Fix version reporting command on linux + * Add pyct.report() + * Allow python -m pyct ... command form. + +- changes from version 0.4.7: + * Added version reporting command. + +------------------------------------------------------------------- Old: ---- pyct-0.4.6.tar.gz New: ---- pyct-0.4.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyct.spec ++++++ --- /var/tmp/diff_new_pack.g2rEUl/_old 2022-08-22 11:05:11.649709641 +0200 +++ /var/tmp/diff_new_pack.g2rEUl/_new 2022-08-22 11:05:11.653709650 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pyct # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,18 +18,21 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyct -Version: 0.4.6 +Version: 0.4.8 Release: 0 Summary: Python package for common tasks for users License: BSD-3-Clause Group: Development/Languages/Python -Url: https://github.com/pyviz/pyct +URL: https://github.com/pyviz/pyct Source0: https://files.pythonhosted.org/packages/source/p/pyct/pyct-%{version}.tar.gz Source100: python-pyct-rpmlintrc -BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-PyYAML +Requires: python-param >= 1.7.0 +Requires: python-requests +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module flake8} @@ -37,11 +40,8 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests} # /SECTION -Requires: python-PyYAML -Requires: python-param >= 1.7.0 -Requires: python-requests -BuildArch: noarch - +Requires(post): update-alternatives +Requires(postun):update-alternatives %python_subpackages %description @@ -68,6 +68,13 @@ %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/pyct + +%post +%python_install_alternative pyct + +%postun +%python_uninstall_alternative pyct %check rm -rf build _build* @@ -78,6 +85,10 @@ %files %{python_files} %doc README.md %license LICENSE.txt -%{python_sitelib}/* +%python_alternative %{_bindir}/pyct +%dir %{python_sitelib}/pyct +%{python_sitelib}/pyct/* +%{python_sitelib}/pyct/.version +%{python_sitelib}/pyct-%{version}-py*.egg-info %changelog ++++++ pyct-0.4.6.tar.gz -> pyct-0.4.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/PKG-INFO new/pyct-0.4.8/PKG-INFO --- old/pyct-0.4.6/PKG-INFO 2018-11-01 21:36:09.000000000 +0100 +++ new/pyct-0.4.8/PKG-INFO 2020-09-11 23:35:50.000000000 +0200 @@ -1,16 +1,15 @@ Metadata-Version: 2.1 Name: pyct -Version: 0.4.6 -Summary: python package common tasks for users (e.g. copy examples, fetch data, ...) -Home-page: https://ioam.github.io/parambokeh -Author: PyViz +Version: 0.4.8 +Summary: Python package common tasks for users (e.g. copy examples, fetch data, ...) +Home-page: https://github.com/pyviz-dev/pyct +Author: HoloViz Author-email: [email protected] -Maintainer: PyViz +Maintainer: HoloViz Maintainer-email: [email protected] License: BSD 3-Clause License -Project-URL: Bug Tracker, https://github.com/pyviz/pyct/issues -Project-URL: Documentation, https://pyviz.github.io/pyct -Project-URL: Source Code, https://github.com/pyviz/pyct +Project-URL: Bug Tracker, https://github.com/pyviz-dev/pyct/issues +Project-URL: Source Code, https://github.com/pyviz-dev/pyct Description: # pyct A utility package that includes: @@ -156,16 +155,26 @@ future, but is provided here as the first step towards unifying/simplifying the maintenance of a number of pyviz projects. + ## pyct report + + Provides a way to check the package versions in the current environment using: + 1. A console script (entry point): `pyct report [packages]`, or + 2. A python function: `import pyct; pyct.report(packages)` + + The python function can be particularly useful for e.g. jupyter notebook users, since it is the packages in the current kernel that we usually care about (not those in the environment from which jupyter notebook server/lab was launched). + + Note that `packages` above can include the name of any Python package (returning the `__version__`), along with the special cases `python` or `conda` (returning the version of the command-line tool) or `system` (returning the OS version). + Platform: UNKNOWN Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Development Status :: 4 - Beta Requires-Python: >=2.7 Description-Content-Type: text/markdown Provides-Extra: cmd -Provides-Extra: doc Provides-Extra: tests +Provides-Extra: doc +Provides-Extra: build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/README.md new/pyct-0.4.8/README.md --- old/pyct-0.4.6/README.md 2018-11-01 21:34:30.000000000 +0100 +++ new/pyct-0.4.8/README.md 2020-09-11 23:34:29.000000000 +0200 @@ -142,3 +142,13 @@ setup.py is run. The way this works is likely to change in the near future, but is provided here as the first step towards unifying/simplifying the maintenance of a number of pyviz projects. + +## pyct report + +Provides a way to check the package versions in the current environment using: + 1. A console script (entry point): `pyct report [packages]`, or + 2. A python function: `import pyct; pyct.report(packages)` + +The python function can be particularly useful for e.g. jupyter notebook users, since it is the packages in the current kernel that we usually care about (not those in the environment from which jupyter notebook server/lab was launched). + +Note that `packages` above can include the name of any Python package (returning the `__version__`), along with the special cases `python` or `conda` (returning the version of the command-line tool) or `system` (returning the OS version). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct/.version new/pyct-0.4.8/pyct/.version --- old/pyct-0.4.6/pyct/.version 2018-11-01 21:36:09.000000000 +0100 +++ new/pyct-0.4.8/pyct/.version 2020-09-11 23:35:50.000000000 +0200 @@ -1 +1 @@ -{"git_describe": "v0.4.6-0-ga58d62d", "version_string": "0.4.6"} \ No newline at end of file +{"git_describe": "v0.4.8-0-g740720a", "version_string": "0.4.8"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct/__init__.py new/pyct-0.4.8/pyct/__init__.py --- old/pyct-0.4.6/pyct/__init__.py 2018-11-01 21:34:30.000000000 +0100 +++ new/pyct-0.4.8/pyct/__init__.py 2020-09-11 23:34:29.000000000 +0200 @@ -1,3 +1,9 @@ -from param.version import Version -__version__ = str(Version(fpath=__file__,archive_commit="$Format:%h$",reponame="pyct")) -del Version +import param + +NAME = "pyct" + +from .report import report # noqa: api + +# version comes from git if available, otherwise from .version file +__version__ = str(param.version.Version(fpath=__file__, archive_commit="$Format:%h$", + reponame=NAME)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct/__main__.py new/pyct-0.4.8/pyct/__main__.py --- old/pyct-0.4.6/pyct/__main__.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pyct-0.4.8/pyct/__main__.py 2020-09-11 23:34:29.000000000 +0200 @@ -0,0 +1,6 @@ +def main(args=None): + import pyct.cmd + pyct.cmd.main() + +if __name__ == "__main__": + main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct/build.py new/pyct-0.4.8/pyct/build.py --- old/pyct-0.4.6/pyct/build.py 2018-11-01 21:34:30.000000000 +0100 +++ new/pyct-0.4.8/pyct/build.py 2020-09-11 23:34:29.000000000 +0200 @@ -20,3 +20,27 @@ shutil.copytree(tree_root, path, ignore=ignore, symlinks=True) else: print('Cannot find %s' % tree_root) + + +def get_setup_version(root, reponame): + """ + Helper to get the current version from either git describe or the + .version file (if available) - allows for param to not be available. + + Normally used in setup.py as follows: + + >>> from pyct.build import get_setup_version + >>> version = get_setup_version(__file__, reponame) # noqa + """ + import json + filepath = os.path.abspath(os.path.dirname(root)) + version_file_path = os.path.join(filepath, reponame, '.version') + try: + from param import version + except: + version = None + if version is not None: + return version.Version.setup_version(filepath, reponame, archive_commit="$Format:%h$") + else: + print("WARNING: param>=1.6.0 unavailable. If you are installing a package, this warning can safely be ignored. If you are creating a package or otherwise operating in a git repository, you should install param>=1.6.0.") + return json.load(open(version_file_path, 'r'))['version_string'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct/cmd.py new/pyct-0.4.8/pyct/cmd.py --- old/pyct-0.4.6/pyct/cmd.py 2018-11-01 21:34:30.000000000 +0100 +++ new/pyct-0.4.8/pyct/cmd.py 2020-09-11 23:34:29.000000000 +0200 @@ -3,6 +3,8 @@ # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division +from . import __version__ +from .report import report import os import importlib @@ -77,6 +79,7 @@ import zipfile import yaml + try: import requests except ImportError: @@ -380,67 +383,91 @@ print("Size of test file {:.2e} did not match " "size of data file {:.2e}".format(test_s, data_s)) +def _add_common_args(parser, name, *args): + if '-v' in args: + parser.add_argument('-v', '--verbose', action='count', default=0) + if '--path' in args: + parser.add_argument('--path',type=str, help='where to place output', default='{}-examples'.format(name)) -# TODO: cmds=None defaults to 'all', basically, which is a bit confusing - -# the alternative is a plugin system? -def add_commands(parser,name,cmds=None,args=None): - # use to add commands to existing parser (see substitute_main for alternative) - # TODO: should be cleaned up +def _set_defaults(parser, name, fn): + parser.set_defaults(func=lambda args: fn(name, **{k: getattr(args,k) for k in vars(args) if k!='func'} )) +# TODO: cmds=None defaults to 'all', basically, which is a bit confusing +def add_commands(parser, name, cmds=None, args=None): + """ + Add all commands in pyct.cmd unless specific cmds are listed + """ if cmds is None: - # again a reg (duplicated in substitute_main) cmds = ['examples','copy-examples','fetch-data','clean-data'] # use dict/reg instead if 'copy-examples' in cmds: eg_parser = parser.add_parser('copy-examples', help=inspect.getdoc(copy_examples)) - eg_parser.set_defaults(func=lambda args: copy_examples(name, args.path, args.verbose, args.force)) - eg_parser.add_argument('--path',type=str,help='where to copy examples',default='%s-examples'%name) - eg_parser.add_argument('-v', '--verbose', action='count', default=0) - eg_parser.add_argument('--force', action='store_true', help='if PATH already exists, force overwrite existing files if older than source files') + eg_parser.add_argument('--force', action='store_true', + help=('if PATH already exists, force overwrite existing ' + 'files if older than source files')) + _add_common_args(eg_parser, name, '-v', '--path') + _set_defaults(eg_parser, name, copy_examples) if 'fetch-data' in cmds: d_parser = parser.add_parser('fetch-data', help=inspect.getdoc(fetch_data)) - d_parser.set_defaults(func=lambda args: fetch_data(name,args.path,args.datasets,use_test_data=args.use_test_data,force=args.force)) - d_parser.add_argument('--path',type=str,help='where to put data',default='%s-examples'%name) - d_parser.add_argument('--datasets',type=str,help='*name* of datasets file; must exist either in path specified by --path or in package/examples/',default='datasets.yml') - d_parser.add_argument('-v', '--verbose', action='count', default=0) - d_parser.add_argument('--force',action='store_true', help='Force any existing data files to be replaced') - d_parser.add_argument('--use-test-data',action='store_true', + d_parser.add_argument('--datasets', type=str, default='datasets.yml', + help=('*name* of datasets file; must exist either in path ' + 'specified by --path or in package/examples/')) + d_parser.add_argument('--force', action='store_true', help='Force any existing data files to be replaced') + d_parser.add_argument('--use-test-data', action='store_true', help=("Use data's test files, if any, instead of fetching full data. " "If test file not in '.data_stubs', fall back to fetching full data.")) + _add_common_args(d_parser, name, '--path') + _set_defaults(d_parser, name, fetch_data) if 'examples' in cmds: egd_parser = parser.add_parser('examples', help=inspect.getdoc(examples)) - egd_parser.set_defaults(func=lambda args: examples(name, args.path, args.verbose, args.use_test_data, args.force)) - egd_parser.add_argument('--path',type=str,help='location to place examples and data',default='%s-examples'%name) - egd_parser.add_argument('-v', '--verbose', action='count', default=0) egd_parser.add_argument('--force', action='store_true', help=('if PATH already exists, force overwrite existing examples if older ' 'than source examples. ALSO force any existing data files to be replaced')) - egd_parser.add_argument('--use-test-data',action='store_true', + egd_parser.add_argument('--use-test-data', action='store_true', help=("Use data's test files, if any, instead of fetching full data. " "If test file not in '.data_stubs', fall back to fetching full data.")) + _add_common_args(egd_parser, name, '-v', '--path') + _set_defaults(egd_parser, name, examples) if 'clean-data' in cmds: cd_parser = parser.add_parser('clean-data', help=inspect.getdoc(clean_data)) - cd_parser.set_defaults(func=lambda args: clean_data(name,args.path)) - cd_parser.add_argument('--path',type=str,help='where to clean data',default='%s-examples'%name) - -def substitute_main(name,cmds=None,args=None): - # can use if your module has no other commands - - if cmds is None: - # again a reg - cmds = ['examples','copy-examples','fetch-data', 'clean-data'] + _add_common_args(cd_parser, name, '--path') + _set_defaults(cd_parser, name, clean_data) +def add_version(parser, name): mod = importlib.import_module(name) + parser.add_argument('--version', action='version', version='%(prog)s ' + mod.__version__) + +def substitute_main(name, cmds=None, args=None): + """ + If module has no other commands, use this function to add all of the ones in pyct.cmd + """ parser = argparse.ArgumentParser(description="%s commands"%name) - parser.add_argument('--version', action='version', version='%(prog)s '+mod.__version__) subparsers = parser.add_subparsers(title='available commands') - add_commands(subparsers,name,cmds,args) + add_commands(subparsers, name, cmds, args) + add_version(parser, name) + args = parser.parse_args() args.func(args) if hasattr(args,'func') else parser.error("must supply command to run") +def main(): + parser = argparse.ArgumentParser(description="Commands relating to versioning") + parser.add_argument('--version', action='version', version='%(prog)s '+__version__) + + subparsers = parser.add_subparsers(title='available commands') + + report_parser = subparsers.add_parser('report', help=inspect.getdoc(report)) + report_parser.set_defaults(func=report) + report_parser.add_argument('packages',metavar='package',type=str,nargs='+', + help='name of package') + + args = parser.parse_args() + + if hasattr(args,'func'): + args.func(*args.packages) + else: + parser.error("must supply command to run") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct/report.py new/pyct-0.4.8/pyct/report.py --- old/pyct-0.4.6/pyct/report.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pyct-0.4.8/pyct/report.py 2020-09-11 23:34:29.000000000 +0200 @@ -0,0 +1,65 @@ +#!/usr/bin/env python +# Import and print the library version and filesystem location for each Python package or shell command specified +# +# bash usage: $ report numpy pandas python conda +# python usage: >>> from report import report; report("numpy","pandas","python","conda") + +from __future__ import print_function +import os.path, importlib, subprocess, platform, sys + +def report(*packages): + """Import and print location and version information for specified Python packages""" + accepted_commands = ['python','conda'] + for package in packages: + loc = "not installed in this environment" + ver = "unknown" + + try: + module = importlib.import_module(package) + loc = os.path.dirname(module.__file__) + + try: + ver = str(module.__version__) + except Exception: + pass + + except (ImportError, ModuleNotFoundError): + if package in accepted_commands: + try: + # See if there is a command by that name and check its --version if so + try: + loc = subprocess.check_output('command -v {}'.format(package), shell=True).decode().splitlines()[0].strip() + except: + # .exe in case powershell (otherwise wouldn't need it) + loc = subprocess.check_output( 'where.exe {}'.format(package), shell=True).decode().splitlines()[0].strip() + out = "" + try: + out = subprocess.check_output([package, '--version'], stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as e: + out = e.output + + # Assume first word in output with a period and digits is the version + for s in out.decode().split(): + if '.' in s and str.isdigit(s[0]) and sum(str.isdigit(c) for c in s)>=2: + ver=s.strip() + break + except: + pass + elif package == 'system': + try: + ver = platform.platform(terse=True) + loc = "OS: " + platform.platform() + except Exception: + pass + else: + pass + + print("{0:30} # {1}".format(package + "=" + ver,loc)) + + +def main(): + report(*(sys.argv[1:])) + +if __name__ == "__main__": + main() + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct/tests/test_report.py new/pyct-0.4.8/pyct/tests/test_report.py --- old/pyct-0.4.6/pyct/tests/test_report.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pyct-0.4.8/pyct/tests/test_report.py 2020-09-11 23:34:29.000000000 +0200 @@ -0,0 +1,50 @@ +from unittest.mock import patch +from pyct.report import report + +class TestModule: + __version__ = "1.9.3" + __file__ = "/mock/opt/anaconda3/envs/pyct/lib/python3.7/site-packages/param/__init__.py" + +@patch("builtins.print") +@patch("importlib.import_module") +def test_report_gives_package_version(mock_import_module, mock_print): + module = TestModule() + mock_import_module.return_value = module + + report("param") + + mock_print.assert_called_with('param=1.9.3 # /mock/opt/anaconda3/envs/pyct/lib/python3.7/site-packages/param') + +@patch("builtins.print") +@patch("subprocess.check_output") +def test_report_gives_conda_version(mock_check_output, mock_print): + mock_check_output.side_effect = [b'/mock/opt/anaconda3/condabin/conda\n', b'conda 4.8.3\n'] + + report("conda") + + mock_print.assert_called_with("conda=4.8.3 # /mock/opt/anaconda3/condabin/conda") + + +@patch("builtins.print") +@patch("subprocess.check_output") +def test_report_gives_python_version(mock_check_output, mock_print): + mock_check_output.side_effect = [b'/mock/opt/anaconda3/envs/pyct/bin/python\n', b'Python 3.7.7\n'] + + report("python") + + mock_print.assert_called_with("python=3.7.7 # /mock/opt/anaconda3/envs/pyct/bin/python") + +@patch("builtins.print") +@patch("platform.platform") +def test_report_gives_system_version(mock_platform, mock_print): + mock_platform.side_effect = ["Darwin-19.2.0", "Darwin-19.2.0-x86_64-i386-64bit"] + + report("system") + + mock_print.assert_called_with("system=Darwin-19.2.0 # OS: Darwin-19.2.0-x86_64-i386-64bit") + +@patch("builtins.print") +def test_unknown_package_output(mock_print): + report("fake_package") + + mock_print.assert_called_with("fake_package=unknown # not installed in this environment") \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct.egg-info/PKG-INFO new/pyct-0.4.8/pyct.egg-info/PKG-INFO --- old/pyct-0.4.6/pyct.egg-info/PKG-INFO 2018-11-01 21:36:09.000000000 +0100 +++ new/pyct-0.4.8/pyct.egg-info/PKG-INFO 2020-09-11 23:35:50.000000000 +0200 @@ -1,16 +1,15 @@ Metadata-Version: 2.1 Name: pyct -Version: 0.4.6 -Summary: python package common tasks for users (e.g. copy examples, fetch data, ...) -Home-page: https://ioam.github.io/parambokeh -Author: PyViz +Version: 0.4.8 +Summary: Python package common tasks for users (e.g. copy examples, fetch data, ...) +Home-page: https://github.com/pyviz-dev/pyct +Author: HoloViz Author-email: [email protected] -Maintainer: PyViz +Maintainer: HoloViz Maintainer-email: [email protected] License: BSD 3-Clause License -Project-URL: Bug Tracker, https://github.com/pyviz/pyct/issues -Project-URL: Documentation, https://pyviz.github.io/pyct -Project-URL: Source Code, https://github.com/pyviz/pyct +Project-URL: Bug Tracker, https://github.com/pyviz-dev/pyct/issues +Project-URL: Source Code, https://github.com/pyviz-dev/pyct Description: # pyct A utility package that includes: @@ -156,16 +155,26 @@ future, but is provided here as the first step towards unifying/simplifying the maintenance of a number of pyviz projects. + ## pyct report + + Provides a way to check the package versions in the current environment using: + 1. A console script (entry point): `pyct report [packages]`, or + 2. A python function: `import pyct; pyct.report(packages)` + + The python function can be particularly useful for e.g. jupyter notebook users, since it is the packages in the current kernel that we usually care about (not those in the environment from which jupyter notebook server/lab was launched). + + Note that `packages` above can include the name of any Python package (returning the `__version__`), along with the special cases `python` or `conda` (returning the version of the command-line tool) or `system` (returning the OS version). + Platform: UNKNOWN Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Development Status :: 4 - Beta Requires-Python: >=2.7 Description-Content-Type: text/markdown Provides-Extra: cmd -Provides-Extra: doc Provides-Extra: tests +Provides-Extra: doc +Provides-Extra: build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct.egg-info/SOURCES.txt new/pyct-0.4.8/pyct.egg-info/SOURCES.txt --- old/pyct-0.4.6/pyct.egg-info/SOURCES.txt 2018-11-01 21:36:09.000000000 +0100 +++ new/pyct-0.4.8/pyct.egg-info/SOURCES.txt 2020-09-11 23:35:50.000000000 +0200 @@ -1,16 +1,21 @@ LICENSE.txt MANIFEST.in README.md +pyproject.toml setup.cfg setup.py pyct/.version pyct/__init__.py +pyct/__main__.py pyct/build.py pyct/cmd.py +pyct/report.py pyct.egg-info/PKG-INFO pyct.egg-info/SOURCES.txt pyct.egg-info/dependency_links.txt +pyct.egg-info/entry_points.txt pyct.egg-info/requires.txt pyct.egg-info/top_level.txt pyct/tests/__init__.py -pyct/tests/test_cmd.py \ No newline at end of file +pyct/tests/test_cmd.py +pyct/tests/test_report.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct.egg-info/entry_points.txt new/pyct-0.4.8/pyct.egg-info/entry_points.txt --- old/pyct-0.4.6/pyct.egg-info/entry_points.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/pyct-0.4.8/pyct.egg-info/entry_points.txt 2020-09-11 23:35:50.000000000 +0200 @@ -0,0 +1,3 @@ +[console_scripts] +pyct = pyct.__main__:main + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyct.egg-info/requires.txt new/pyct-0.4.8/pyct.egg-info/requires.txt --- old/pyct-0.4.6/pyct.egg-info/requires.txt 2018-11-01 21:36:09.000000000 +0100 +++ new/pyct-0.4.8/pyct.egg-info/requires.txt 2020-09-11 23:35:50.000000000 +0200 @@ -1,5 +1,9 @@ param>=1.7.0 +[build] +setuptools +param>=1.7.0 + [cmd] pyyaml requests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/pyproject.toml new/pyct-0.4.8/pyproject.toml --- old/pyct-0.4.6/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/pyct-0.4.8/pyproject.toml 2020-09-11 23:34:29.000000000 +0200 @@ -0,0 +1,5 @@ +[build-system] +requires = [ + "param >=1.7.0", + "setuptools >=30.3.0" +] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/setup.cfg new/pyct-0.4.8/setup.cfg --- old/pyct-0.4.6/setup.cfg 2018-11-01 21:36:09.000000000 +0100 +++ new/pyct-0.4.8/setup.cfg 2020-09-11 23:35:50.000000000 +0200 @@ -1,52 +1,9 @@ [metadata] -name = pyct -version = attr: param.version.get_setupcfg_version -description = python package common tasks for users (e.g. copy examples, fetch data, ...) -long_description = file: README.md -long_description_content_type = text/markdown -license = BSD 3-Clause License license_file = LICENSE.txt -classifiers = - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Development Status :: 4 - Beta -author = PyViz -author_email = [email protected] -maintainer = PyViz -maintainer_email = [email protected] -url = https://ioam.github.io/parambokeh -project_urls = - Bug Tracker = https://github.com/pyviz/pyct/issues - Documentation = https://pyviz.github.io/pyct - Source Code = https://github.com/pyviz/pyct - -[options] -include_package_data = True -packages = find: -python_requires = >=2.7 -install_requires = - param >=1.7.0 - -[options.extras_require] -cmd = - pyyaml - requests -tests = - flake8 - pytest -doc = - nbsite - sphinx_ioam_theme [wheel] universal = 1 -[tool:autover.configparser_workaround.archive_commit=$Format:%h$] - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyct-0.4.6/setup.py new/pyct-0.4.8/setup.py --- old/pyct-0.4.6/setup.py 2018-11-01 21:34:30.000000000 +0100 +++ new/pyct-0.4.8/setup.py 2020-09-11 23:34:29.000000000 +0200 @@ -1,7 +1,90 @@ -from setuptools import setup +from setuptools import setup, find_packages -# TODO: need to put in build dependency checks until pyproject.toml is widely -# supported. +# unfortunately cannot avoid duplicating this from build.py +def get_setup_version(root, reponame): + """ + Helper to get the current version from either git describe or the + .version file (if available) - allows for param to not be available. + + Normally used in setup.py as follows: + + >>> from pyct.build import get_setup_version + >>> version = get_setup_version(__file__, reponame) # noqa + """ + import os + import json + + filepath = os.path.abspath(os.path.dirname(root)) + version_file_path = os.path.join(filepath, reponame, '.version') + try: + from param import version + except: + version = None + if version is not None: + return version.Version.setup_version(filepath, reponame, archive_commit="$Format:%h$") + else: + print("WARNING: param>=1.6.0 unavailable. If you are installing a package, this warning can safely be ignored. If you are creating a package or otherwise operating in a git repository, you should install param>=1.6.0.") + return json.load(open(version_file_path, 'r'))['version_string'] + + +NAME = 'pyct' +DESCRIPTION = 'Python package common tasks for users (e.g. copy examples, fetch data, ...)' + +setup_args = dict( + name=NAME, + version=get_setup_version(__file__, NAME), + description=DESCRIPTION, + long_description=open("README.md").read(), + long_description_content_type="text/markdown", + license='BSD 3-Clause License', + license_file='LICENSE.txt', + classifiers = [ + 'License :: OSI Approved :: BSD License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.6', + 'Development Status :: 4 - Beta' + ], + author='HoloViz', + author_email='[email protected]', + maintainer='HoloViz', + maintainer_email='[email protected]', + url='https://github.com/pyviz-dev/{}'.format(NAME), + project_urls = { + 'Bug Tracker': 'https://github.com/pyviz-dev/{}/issues'.format(NAME), + 'Source Code': 'https://github.com/pyviz-dev/{}'.format(NAME), + }, + include_package_data=True, + packages=find_packages(), + python_requires='>=2.7', + install_requires=[ + 'param >=1.7.0', + ], + extras_require={ + 'cmd': [ + 'pyyaml', + 'requests' + ], + 'tests': [ + 'flake8', + 'pytest' + ], + 'doc': [ + 'nbsite', + 'sphinx_ioam_theme' + ], + 'build': [ + "setuptools", + "param >=1.7.0", + ] + }, + entry_points = { + 'console_scripts': [ + 'pyct=pyct.__main__:main', + ], + } +) if __name__ == "__main__": - setup() + setup(**setup_args)
