How to use the setuptools.command.develop.develop function in setuptools

To help you get started, we’ve selected a few setuptools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github awslabs / autogluon / setup.py View on Github external
def create_version_file():
    global version, cwd
    print('-- Building version ' + version)
    version_path = os.path.join(cwd, 'autogluon', 'version.py')
    with open(version_path, 'w') as f:
        f.write('"""This is autogluon version file."""\n')
        f.write("__version__ = '{}'\n".format(version))

# run test scrip after installation
class install(setuptools.command.install.install):
    def run(self):
        create_version_file()
        setuptools.command.install.install.run(self)

class develop(setuptools.command.develop.develop):
    def run(self):
        create_version_file()
        setuptools.command.develop.develop.run(self)

try:
    import pypandoc
    long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
    long_description = open('README.md').read()

MIN_PYTHON_VERSION = '>=3.6.*'

requirements = [
    'numpy>=1.16.0',
    'scipy>=1.3.3',
    'cython',
github MyreMylar / pygame_gui / setup.py View on Github external
def run(self):
        def _post_install():
            from stringify import stringify_py

            stringify_py(source_path='pygame_gui/data',
                         destination_file='pygame_gui/core/_string_data.py')

        atexit.register(_post_install)
        develop.run(self)
github Azure / iotedgedev / setup.py View on Github external
def run(self):
        atexit.register(_execute)
        develop.run(self)
github navytux / pygolang / setup.py View on Github external
def write_script(self, script_name, script, mode="t", blockers=()):
        script_name, script = self.transform_script(script_name, script)
        _develop.write_script(self, script_name, script, mode, blockers)
github sprin / pg-discuss / setup.py View on Github external
os.path.join(root, f) for f in filenames
                    if not f.endswith('.pyc')]
                data_files.append([root, full_filenames])
    return data_files


class DevelopDocs(develop):
    """Custom command to require docs dependencies."""

    def __init__(self, *args, **kwargs):
        global requires
        requires += ['sphinx>=1.3.1']
        develop.__init__(self, *args, **kwargs)


class DevelopTests(develop):
    """Custom command to require test dependencies."""

    def __init__(self, *args, **kwargs):
        global requires
        requires += [
            'pytest>=2.8.0',
            'pytest-cov>=2.1.0',
        ]
        develop.__init__(self, *args, **kwargs)

setup(
    name='pg-discuss',
    version='1.0b1',

    description='A comment system backend on top of PostgreSQL',
    license='MIT',
github MyreMylar / pygame_gui / setup.py View on Github external
import atexit
from setuptools import setup
from setuptools.command.develop import develop


class DevelopOnlyInstall(develop):
    def run(self):
        def _post_install():
            from stringify import stringify_py

            stringify_py(source_path='pygame_gui/data',
                         destination_file='pygame_gui/core/_string_data.py')

        atexit.register(_post_install)
        develop.run(self)


setup(
      cmdclass={'develop': DevelopOnlyInstall},
      name='pygame_gui',
      version='0.6.0',
      description='A GUI module for pygame 2',
github bogdanvuk / pygears / setup.py View on Github external
def run(self):
        develop.run(self)
        setup_home()
github shellphish / shellphish-afl / setup.py View on Github external
def run(self):
        self.execute(_setup_other_arch, (), msg="Setting up AFL-other-arch")
        self.execute(_setup_cgc, (), msg="Setting up AFL-cgc")
        self.execute(_setup_libs, (), msg="Getting libraries")
        _datafiles()
        _develop.run(self)
github tethysplatform / tethys / tethys_apps / app_installation.py View on Github external
def custom_develop_command(app_package, app_package_dir, dependencies):
    """
    DEPRECATED: Returns a custom develop command class that is tailored for the app calling it.
    """
    warnings.warn("The setup script for {} is outdated. Please run 'tethys gen setup' to update it.".format(app_package), DeprecationWarning)  # noqa: E501

    return develop
github ApolloAuto / apollo-platform / ros / third_party / lib_x86_64 / python2.7 / dist-packages / numpy / distutils / command / develop.py View on Github external
""" Override the develop command from setuptools so we can ensure that our
generated files (from build_src or build_scripts) are properly converted to real
files with filenames.

"""
from __future__ import division, absolute_import, print_function

from setuptools.command.develop import develop as old_develop

class develop(old_develop):
    __doc__ = old_develop.__doc__
    def install_for_development(self):
        # Build sources in-place, too.
        self.reinitialize_command('build_src', inplace=1)
        # Make sure scripts are built.
        self.run_command('build_scripts')
        old_develop.install_for_development(self)