Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search.
I have a python application mainly done using pyqt. I am using py2exe to create the executable, my setup. I am not sure how to do this. Can anyone suggest how? Make sure that you call the function as part of a list comprehension - apparently setuptools doesn't play nice with list-alikes instead of straight up lists.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Copy an entire folder in a setup. I just wanted to follow up on something I found working with Python 2. IN with the files I wanted which put the non-python files into the tarball, but did not install them on the target machine via RPM. The option files let you modify various sections of the spec file from setup.
As follows. None of the answers worked for me because my files were at the top level, outside the package. I used a custom build command instead.
For non-python files to be included in an installation, they must be within one of the installed package directories. The "documented" ways of installing arbitrary files outside of your package directories do not work reliably as everyone has noticed by now. Why setuptools would include files in your distribution and then silently never install them, is beyond my ken. Though installing them outside of your package directory is probably even more dubious.
Figured out a workaround: I renamed my lgpl2. Making it a Python module is ugly, I know, but I consider it less ugly than specifying absolute paths. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Including non-Python files with setup. Asked 12 years, 2 months ago. Active 4 days ago. Viewed k times. Improve this question. SilentGhost k 61 61 gold badges silver badges bronze badges.
Ram Rachum Ram Rachum After some negative feedback, I read your question again and realized what I was missing. I have updated my answer to provide a non-hackish solution to your question that doesn't require any additional modules such as setuptools or distribute. Thanks Evan. However, I am perfectly okay with using setuptools, since it is so prevalent. Add a comment. Active Oldest Votes. UPDATE: Another [Better] Approach Another approach that works well if you just want to control the contents of the source distribution sdist and have files outside of the package e.
Improve this answer. Hans L Hans L 5, 4 4 gold badges 20 20 silver badges 20 20 bronze badges. This answer looks sensible, but doesn't work for me. Ian Bicking's presentation only shows how to install package data for files that are within a package. This answer does not work for me. The additional files are not getting put into the tarball Show 10 more comments.
To accomplish what you're describing will take two steps The file needs to be added to the source tarball setup. Step 2: To install the data file to the source folder, modify setup. To modify the data install dir to match the source install dir Pull the install dir info from distutils with: from distutils.
Evan Plaice Evan Plaice Files listed there won't be installed. To install a package that includes a setup. Packages installed with setup. However, some requirements are optional. Complete package build requirements for a setup. Sample Project is a template package with a setup. The file is annotated with comments for customizing the script, and for the overall package build environment. ActiveState provides a unified cross-platform toolchain for modern Python package management.
It can replace the complex and hard-to-maintain in-house solutions built from multiple package managers, environment management tools and other solutions. Ultimately, developers that are willing to adopt the ActiveState Platform will spend less time wrestling with tooling and more time focused on doing what they do best: coding.
To try the ActiveState Platform for yourself, sign-up for a free account. How to Install Python Packages using a Script. How to Update All Python Packages. If necessary, you can manually install packages in Python. Some packages have special installation requirements. Other packages can be installed manually with setup. To manually install packages in Python with setup.
0コメント