Skip to main content

Utilities for Buildout developed for Up There They Love.

Project description

uttl.buildout

Utilities for zc.buildout for different build systems on Windows, as used by Up There They Love for developing their titles.

Usage

The uttl.buildout package will be automatically installed from PyPi using easy_install when you use it in your buildout configuration.

You can also clone the repository to disk and use the recipes directly without installing a package.

[buildout]
develop = C:\Downloads\uttl-buildout

The downside of this approach is that your configuration will be invalidated (and thus your dependencies rebuilt) when the recipes change.

Example

[buildout]
parts =
    devenv
    game

# find devenv executable from visual studio path

[devenv]
recipe = uttl.buildout:versioncheck
required-major = 2017
required-minor = 15
body = ... path = None
    ... args = [ 
    ...   r'%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe',
    ...   '-version',
    ...   '%s.0' % (self.options['required-minor']),
    ...   '-property',
    ...   'installationPath'
    ... ]
    ...
    ... try:
    ...   with subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as proc:
    ...     for line in iter(proc.stdout.readline, b''):
    ...       path = os.path.abspath(str(line.rstrip(), encoding='ascii'))
    ...       break
    ... except FileNotFoundError:
    ...   self.log.error('Visual Studio is not installed.')
    ...   return (False, 0, 0, 0, '')
    ...
    ... if not path:
    ...   self.log.error('Cannot find Visual Studio executable.')
    ...   return (False, 0, 0, 0, '')
    ...
    ... path = os.path.abspath(path + r'\Common7\IDE\devenv.com')
    ... if not os.path.exists(path):
    ...   self.log.error('Failed to find path to devenv.')
    ...   return (False, 0, 0, 0, '')
    ...
    ... return (True, self.options['required-major'], self.options['required-minor'], 64, path)

# build game executable

[game]
recipe = uttl.buildout:devenv
executable = ${devenv:path}
solution = SSSG.sln
project = SSSG
build = Release

Recipes

The following recipes (scripts) for zc.buildout are available in this package:

Check the source folders for detailed documentation about each recipe.

Testing locally

Check that you're running at least Python 3.9:

D:\Projects\uttl-buildout>python --version
Python 3.9.5

Build and install egg on system:

python setup.py install

Uploading new package

Create egg in dist/ folder:

python setup.py bdist_egg

Upload packaged egg to repository:

python -m twine upload --repository pypi dist/*

Changes

1.2.3 - 2021-09-30

  • Added missing package initialization for uttl.buildout.dotnet.restore folder

1.2.2 - 2021-09-30

  • Small fix to README in package

1.2.1 - 2021-09-30

  • Command: Added missing always-install option to documentation
  • Command: Added working-dir option
  • CopyFile: Renamed source-path, destination-path to -dir (old names treated as synonymous)
  • CMake: Renamed source-path, install-path, configure-path, and build-path to -dir (old names treated as synonymous)
  • CMake: Added working-dir option
  • DotnetRestore: Fixed recipe being registered with the wrong name
  • DotnetRestore: Renamed config-file to config-path (old name treated as synonymous)
  • DotnetRestore: Renamed packages-path to packages-dir (old name treated as synonymous)
  • DotnetRestore: Added working-dir option
  • Devenv: Renamed solution to solution-path (old name treated as synonymous)
  • Devenv: Added working-dir option
  • Inklecate: Renamed output-directory to output-dir (old name treated as synonymous)
  • Inklecate: Renamed input to inputs (old name treated as synonymous)
  • Inklecate: Added working-dir option
  • QMake: Added working-dir option
  • QtDeploy: Added dir, libraries-dir, plugins-dir, libraries, qml-dir, qml-import, plugins, and patch-qt options
  • QtDeploy: Added lib- option to explicity add or skip libaries
  • QtDeploy: Added working-dir option
  • VersionCheck: Made body option mandatory

1.2.0 - 2021-09-28

  • All: Added optional artefacts and arguments options
  • CMake: Made the path to source option mandatory to prevent user error
  • Command: New recipe for calling executables
  • CopyFile: Install files before copying them

1.1.0 - 2021-09-27

  • All: Changed all options from snake_case to kebab-case
  • DotnetRestore: New recipe for invoking dotnet commands
  • CMake: Fixed source path option
  • CMake: Made target option a synonym for targets
  • CopyFile: Copies files if they do not exist or if they were modified
  • CopyFile: Added documentation
  • Devenv: Cleaned up script
  • Devenv: Added documentation
  • QMake: Fixed files option throwing an error
  • QMake: Expanded documentation
  • QMake: Fixed typos in documentation

1.0.0 - 2021-09-26

  • Initial release

License

MIT No Attribution

Copyright 2021 Mr. Hands mrhands31@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Built Distribution

uttl.buildout-1.2.4-py3.9.egg (42.5 kB view hashes)

Uploaded 1 2 4

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page