Skip to content

Helper class and small change for where a2 / b2 is none or not specified#2

Open
Hecatron wants to merge 1 commit into
eisensheng:developfrom
Hecatron-Forks:develop
Open

Helper class and small change for where a2 / b2 is none or not specified#2
Hecatron wants to merge 1 commit into
eisensheng:developfrom
Hecatron-Forks:develop

Conversation

@Hecatron
Copy link
Copy Markdown

Hi, I've been using the patchit module because it seems to be one of the few python ones compatible with python 3
I've added a small helper class to make patching files easier
also I noticed when running diff -Naur against a couple of directories sometimes a2 / b2 is not specified so should be assumed to be 0 instead of None

as an example

diff -Naur original\sox/libgsm/CMakeLists.txt packages\sox/libgsm/CMakeLists.txt
--- original\sox/libgsm/CMakeLists.txt Wed Mar 2 22:10:27 2011
+++ packages\sox/libgsm/CMakeLists.txt Thu Aug 20 10:59:03 2015
@@ -1 +1,9 @@
add_library(gsm add code decode gsm_create gsm_decode gsm_destroy gsm_encode gsm_option long_term lpc preprocess rpe short_term table)
+
+# Set the Output Directory for libs
+set_target_properties( gsm

  • PROPERTIES
  • ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../LibOutput"
  • LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../LibOutput"
  • RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../LibOutput"
    +)

…asier, also made a small change to patchit.py for when the a2 / b2 values are not specified in a diff which can sometimes show up with diff -Naur
@eisensheng
Copy link
Copy Markdown
Owner

Hey!

Thanks for contributing. The Python3 compatibility is actually a little bit lacking. There is a little confusing with the encoding and Unicode for file content and unified diff files. I rewrote these parts of the library some time ago with clear Python2 and Python3 compatibility in mind but unfortunately got stuck and distracted midway. I'll look into it and try to get it done and rebase your work on top of it next weekend since there seems to be some interest in this library. Please stay patient and thanks for your interest in this library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants