On 02/04/2014 02:46 PM, Robert Schweikert wrote:
Trying to create a package from source that has no setup.py. THus to keep things simple I figured I'd create one myself ;) . But that's not working out the way I figured it would, thus I could use a hint or two.
The source tree has packages in the lib directory, i.e. lib/a lib/b lib/c exist. The problem now is that some of these are dependencies that are already packaged. For simplicty lets say I am only interested in installing b.
Thus in my setup.py file I have
setuptools.setup( ..... .... packages=setuptools.find_packages('lib', exclude=['a','c']), package_dir={'': 'lib'} )
Based on the info that I found the "exclude" argument should tell find_packages to not consider those packages and this works. When running in an active session and printing the results of find_packages I get only stuff in "b".
However when I run setup.py I still get "a" and "c" installed in the target directory :(
When you say "when I run setup.py" do you mean you are calling python setup.py build and then you are looking in the "build" directory and seeing that the folders "lib/a" and "lib/c" still exist there? If that is the case, you can run "python setup.py clean --all" to remove the build directory and start fresh. The build command won't remove those folders if they already exist in the build output. Also, for some reason the clean command without the --all flag doesn't remove the build directory, only some "temporary files" which is unclear to me what that actually means. I think your packages and package_dir parameters are good for what you are trying to do. -- Jason Craig -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org