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

Track data files without requiring setuptools-git #44

Closed
wants to merge 1 commit into from

Conversation

kprussing
Copy link
Contributor

Fixes #33. This was accidentally opened as #43 which is now closed.

As discussed in #33, the data files for the development
branch are not tracked unless the user has setuptools-git installed.
However, it is not guaranteed that all users will have this requirement
as not all end users are necessarily developers or have the proper git
tools installed. This patch adds a function to the setup.py script to
traverse the packages and locate data files in all subdirectories that
are not subpackages. Data files are assumed to be all files that are
not Python files (.py and .pyc).

As discussed in uvemas#33, the data files for the development
branch are not tracked unless the user has setuptools-git installed.
However, it is not guaranteed that all users will have this requirement
as not all end users are necessarily developers or have the proper git
tools installed.  This patch adds a function to the setup.py script to
traverse the packages and locate data files in all subdirectories that
are not subpackages.  Data files are assumed to be all files that are
not Python files (.py and .pyc).
@alexey-naydenov
Copy link
Collaborator

Hi,
Replacing setuptools-git with custom script does not seem like a clean solution to me. I agree that requiring git (through setuptools-git) in order to use vitables is not very nice either. I think there are 2 better alternatives: use manifest.in or create linux packages. Manifest file can be created using some script.

@kprussing
Copy link
Contributor Author

I agree that a custom script like this may not be the cleanest solution. I can think of a few ways that erroneous files could be included in the install. Looking at the documentation for setup tools, the MANIFEST.in file is the commonly recommended way to go. Looking at the project, I thought the move away from the MANIFEST.in to dynamically detecting the included files was desired; thus, I wrote the script. I attempted to use the package_data keyword to setup, but I could not get the globbing to properly discover all of the necessary files. I can go back and rework parts to generate the MANIFEST.in, or I can just write the file.

You guys have done a great job with ViTables, and I know your schedules are busy. I'm just lucky that the project I'm working on at the moment allows me to put a bit of effort into helping.

@kprussing
Copy link
Contributor Author

I got a chance to take another look at using the MANIFEST.in and the package_data keyword. The issue with the globbing using package_data was due to my misunderstanding of what it will find. Using this method, the change reduces to just four lines. You can see the changes I made on this branch.

I won't bother initiating another pull request if you have different solution you prefer because I don't want to spam the issues with superfluous pull requests.

@kprussing kprussing closed this Jun 18, 2015
@kprussing
Copy link
Contributor Author

Using the Manifest file is the cleaner solution. Attempting to use the package_data keyword to the setup function does not always recursively track the data files. I encountered this creating a source distribution for my colleagues. My final solution was to just use the following two lines in the Manifest file.

include *.pro *.txt *.ts VERSION
recursive-include vitables *.ico *.ini *.png *.qm *.svg *.ui

@kprussing kprussing deleted the install_fix branch June 18, 2015 19:25
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