Repaired build & publish #93
This commit is contained in:
parent
1bbec27d1a
commit
186b336bf3
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'cpl-cli'
|
||||
__title__ = 'cpl_cli'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates'
|
||||
__title__ = 'cpl_cli._templates'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.build'
|
||||
__title__ = 'cpl_cli._templates.build'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.generate'
|
||||
__title__ = 'cpl_cli._templates.generate'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new'
|
||||
__title__ = 'cpl_cli._templates.new'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.console'
|
||||
__title__ = 'cpl_cli._templates.new.console'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.console.source'
|
||||
__title__ = 'cpl_cli._templates.new.console.source'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.console.source.name'
|
||||
__title__ = 'cpl_cli._templates.new.console.source.name'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.library'
|
||||
__title__ = 'cpl_cli._templates.new.library'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.library.source'
|
||||
__title__ = 'cpl_cli._templates.new.library.source'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.library.source.name'
|
||||
__title__ = 'cpl_cli._templates.new.library.source.name'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.unittest'
|
||||
__title__ = 'cpl_cli._templates.new.unittest'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.unittest.source'
|
||||
__title__ = 'cpl_cli._templates.new.unittest.source'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.new.unittest.source.name'
|
||||
__title__ = 'cpl_cli._templates.new.unittest.source.name'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = '_templates.publish'
|
||||
__title__ = 'cpl_cli._templates.publish'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'command'
|
||||
__title__ = 'cpl_cli.command'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'configuration'
|
||||
__title__ = 'cpl_cli.configuration'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'live_server'
|
||||
__title__ = 'cpl_cli.live_server'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'migrations'
|
||||
__title__ = 'cpl_cli.migrations'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'migrations.base'
|
||||
__title__ = 'cpl_cli.migrations.base'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'migrations.service'
|
||||
__title__ = 'cpl_cli.migrations.service'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'publish'
|
||||
__title__ = 'cpl_cli.publish'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -433,7 +433,7 @@ class PublisherService(PublisherABC):
|
||||
3. Copies all included source files to dist_path/build
|
||||
:return:
|
||||
"""
|
||||
self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125)
|
||||
self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125)
|
||||
self.exclude(f'*/{self._project_settings.name}.json')
|
||||
self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'build'))
|
||||
|
||||
@ -456,7 +456,7 @@ class PublisherService(PublisherABC):
|
||||
4. Remove all included source from dist_path/publish
|
||||
:return:
|
||||
"""
|
||||
self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125)
|
||||
self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125)
|
||||
self.exclude(f'*/{self._project_settings.name}.json')
|
||||
self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'publish'))
|
||||
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'source_creator'
|
||||
__title__ = 'cpl_cli.source_creator'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'validators'
|
||||
__title__ = 'cpl_cli.validators'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de'
|
||||
|
@ -78,7 +78,7 @@ class BuildTestCase(unittest.TestCase):
|
||||
def test_build(self):
|
||||
CLICommands.build()
|
||||
dist_path = './dist'
|
||||
full_dist_path = f'{dist_path}/{self._source}/build/'
|
||||
full_dist_path = f'{dist_path}/{self._source}/build/{String.convert_to_snake_case(self._source)}'
|
||||
self.assertTrue(os.path.exists(dist_path))
|
||||
self.assertTrue(os.path.exists(full_dist_path))
|
||||
self.assertFalse(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path))
|
||||
|
@ -79,7 +79,7 @@ class PublishTestCase(unittest.TestCase):
|
||||
CLICommands.publish()
|
||||
dist_path = './dist'
|
||||
setup_path = f'{dist_path}/{self._source}/publish/setup'
|
||||
full_dist_path = f'{dist_path}/{self._source}/publish/'
|
||||
full_dist_path = f'{dist_path}/{self._source}/publish/build/lib/{String.convert_to_snake_case(self._source)}'
|
||||
self.assertTrue(os.path.exists(dist_path))
|
||||
self.assertTrue(os.path.exists(setup_path))
|
||||
self.assertTrue(os.path.exists(os.path.join(setup_path, f'{self._source}-0.0.0.tar.gz')))
|
||||
@ -89,4 +89,4 @@ class PublishTestCase(unittest.TestCase):
|
||||
with open(f'{full_dist_path}/{self._source}.json', 'w') as file:
|
||||
file.write(json.dumps(self._get_project_settings(), indent=2))
|
||||
file.close()
|
||||
# self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path))
|
||||
self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path))
|
||||
|
Loading…
Reference in New Issue
Block a user