Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .gitignore #196

Merged
merged 1 commit into from Mar 6, 2019
Merged

Add .gitignore #196

merged 1 commit into from Mar 6, 2019

Conversation

jmirabel
Copy link
Collaborator

@jmirabel jmirabel commented Mar 5, 2019

1d9aeca introduced a Python script. When the Python script is used, the file is compiled and the pyc file makes the module dirty. This pollutes git status.

I didn't want to copy the file to the build directory because it seems overkill but I can do it if necessary.

@jcarpent
Copy link
Contributor

jcarpent commented Mar 5, 2019

With this solution, you cannot then have multiple builds. I mean, they will all share the same generated file, which might be not safe.

@jmirabel
Copy link
Collaborator Author

jmirabel commented Mar 5, 2019

The file is not generated by CMake. It will be the same for every build. It is a compiled version of the Python script. Even if it changes, Python will take care of removing it if the compiled version is not up to date.

@jcarpent
Copy link
Contributor

jcarpent commented Mar 5, 2019

But this means that if you have a build with Python2 or Python3, it will not be the same.

@jmirabel
Copy link
Collaborator Author

jmirabel commented Mar 5, 2019

It won't be the same but the pyc file will be overwritten each time you need it (@nim65s can you confirm this ?).

@nim65s
Copy link
Collaborator

nim65s commented Mar 5, 2019

pyc files names have changed between python 2 & python 3, ref PEP 3147, so you should not fear having a wrong one.

But they are generated files, so there is no point in versioning them, and therefore I usually put *.pyc in a global gitignore file.

@jmirabel
Copy link
Collaborator Author

jmirabel commented Mar 5, 2019

therefore I usually put *.pyc in a global gitignore file.

Putting *.pyc is also good for me.

@jcarpent
Copy link
Contributor

jcarpent commented Mar 5, 2019

maybe just a hpp/idl/*.pyc will be enough. In this way, we can still detect default in other directories.

@jmirabel
Copy link
Collaborator Author

jmirabel commented Mar 6, 2019

I updated the file accordingly.

@jcarpent
Copy link
Contributor

jcarpent commented Mar 6, 2019

Looks good to me. I will merge it now.

@jcarpent jcarpent merged commit 0459e4d into jrl-umi3218:master Mar 6, 2019
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.

None yet

3 participants