Skip to content

Commit

Permalink
fix bug on case insensitive machines
Browse files Browse the repository at this point in the history
  • Loading branch information
ussserrr committed Feb 10, 2019
1 parent 5df0a84 commit 496e8eb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ stm32pio changelog:
- Changed: PEP 8 conformity: multi-line imports
- Changed: 'miscs.py' module is renamed to 'util.py'

ver. 0.72 (10.02.19):
ver. 0.73 (10-11.02.19):
- New: use more convenient Python project structure
- New: package can be install using setuptools
- New: TODO list
- New: '--directory' option is now optional if the program gets called from the project directory
- Fixed: license copyright
- Fixed: 'dot' path will be handle successfully now
- Fixed: bug on case insensitive machines
- Changed: test '.ioc' file is updated to the latest STM32CubeMX version (5.0.1 at the moment)
- Changed: documentation improvements
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="stm32pio",
version="0.72",
version="0.73",
author="ussserrr",
author_email="[email protected]",
description="Small cross-platform Python app that can create and update PlatformIO projects from STM32CubeMX .ioc "
Expand Down
2 changes: 1 addition & 1 deletion stm32pio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = "stm32pio"
__version__ = "0.72"
__version__ = "0.73"
6 changes: 3 additions & 3 deletions stm32pio/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def test_generate_code(self):

util.generate_code(project_path)
self.assertEqual([os.path.isfile(os.path.join(project_path, settings.cubemx_script_filename)),
os.path.isdir(os.path.join(project_path, 'Src')),
os.path.isdir(os.path.join(project_path, 'Inc'))],
os.path.isfile(os.path.join(project_path, 'Src/main.c')),
os.path.isfile(os.path.join(project_path, 'Inc/main.h'))],
[True, True, True],
msg=f"{settings.cubemx_script_filename}, /Inc, /Src haven't been created")
msg=f"{settings.cubemx_script_filename}, /Inc/main.h, /Src/main.c haven't been created")


@clean_run
Expand Down
3 changes: 2 additions & 1 deletion stm32pio/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def patch_platformio_ini(project_path):
logger.warning("'platformio.ini' file not found")

shutil.rmtree(os.path.join(project_path, 'include'), ignore_errors=True)
shutil.rmtree(os.path.join(project_path, 'src'), ignore_errors=True)
if not os.path.exists(os.path.join(project_path, 'SRC')): # case sensitive file system
shutil.rmtree(os.path.join(project_path, 'src'), ignore_errors=True)



Expand Down

0 comments on commit 496e8eb

Please sign in to comment.