Skip to content

Commit

Permalink
Fix exporting and main module
Browse files Browse the repository at this point in the history
  • Loading branch information
hunger committed Apr 14, 2018
1 parent 6412507 commit aa486a8
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ clrm-*

systems/*
.pytest_cache/*
*.egg-info
build/*
dist/*

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ booting into it.

## Installation

TODO: Installation is not yet supported.
Use python setuptools as usual.

## Tests

Expand All @@ -24,6 +24,11 @@ Use ```pytest tests``` in the top level directory to run all tests.

* Tobias Hunger <[email protected]>

## Code of Conduct

Everybody is expected to follow the Python Community Code of Conduct
https://www.python.org/psf/codeofconduct/

## License

All files in cleanroom are under GPL v3 (or later).
Expand Down
2 changes: 0 additions & 2 deletions cleanroom/commands/_export_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def __call__(self, location, system_context, *args, **kwargs):
if repository == '':
return

return

borg = system_context.ctx.binary(context.Binaries.BORG)
backup_name = system_context.system + '-' + system_context.timestamp

Expand Down
7 changes: 5 additions & 2 deletions cleanroom/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ def _parse_commandline(arguments):
return parse_result


def main():
def run():
main(*sys.argv)

def main(*args):
old_work_directory = os.getcwd()

args = _parse_commandline(sys.argv)
args = _parse_commandline(args)

if not args.list_commands and not args.systems:
print('No systems to process.')
Expand Down
2 changes: 1 addition & 1 deletion clrm
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ import cleanroom.main as main


if __name__ == '__main__':
main.main()
main.run()
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FIXME: Write docs...
51 changes: 44 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,51 @@
from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

setup(
name='cleanroom',
description='Linux system image creator',
version='0.1',
# Package data:
name='cleanroom',
description='Linux system image creator',
long_description=long_description,
long_description_content_type='text/markdown',
version='0.1',
python_requires='>=3.5',
url='https://gitlab.con/hunger/cleanroom',
project_urls={
'Source code': 'https://gitlab.com/hunger/cleanroom',
'Code of Conduct': 'https://www.python.org/psf/codeofconduct/',
},

author='Tobias Hunger',
author_email='[email protected]',

classifiers=[
'Development Status :: 4 - Beta'

'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Environment :: Console',

'License :: OSI Approved :: GPL License',

author='Tobias Hunger',
author_email='[email protected]',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],

url='https://gitlab.com/hunger/cleanroom',
keywords='Linux stateless immutable install image',

packages=find_packages()
# Contents:
packages=find_packages(exclude=['systems', 'examples', 'docs', 'tests']),
package_data={'cleanroom': ['commands/*.py']},
entry_points={
'console_scripts': [
'cleanroom=cleanroom.main:run',
],
},
)

0 comments on commit aa486a8

Please sign in to comment.