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
Fabric can't load package with *.pyc only #1427
Comments
oldsharp
added a commit
to oldsharp/fabric-fabric
that referenced
this issue
Dec 27, 2016
As the doc (sites/docs/usage/fabfiles.rst, in "Fabfile discovery") says, Fabric is capable of loading Python modules (e.g. fabfile.py) or packages (e.g. a fabfile/ directory containing an __init__.py). Starting from version 0.9.2, Fabric has been capable of loading package fabfiles. However, Fabric's fabfile discovery algorithm only treats directories with an __init__.py file in them as legal Python packages. It refuse to load any directories with an __init__.pyc file only (without __init__.py) in them, which are also legal Python packages. Fabric's current fabfile discovery algorithm works well for most cases. But in some cases, for example, suppose someone would like to release a tool, which consist of several Fabric tasks, in such a format that it only contains *.pyc files, i.e. he/she does not want to release the source code at all. In such a case, users could run into trouble since Fabric refuse to load packages which only have an __init__.pyc in them. This commit gives Fabric the ability to load package fabfiles with __init__.pyc file only. This resolves fabric#1427.
oldsharp
added a commit
to oldsharp/fabric-fabric
that referenced
this issue
Dec 27, 2016
As the doc (sites/docs/usage/fabfiles.rst, in "Fabfile discovery") says, Fabric is capable of loading Python modules (e.g. fabfile.py) or packages (e.g. a fabfile/ directory containing an __init__.py). Starting from version 0.9.2, Fabric has been capable of loading package fabfiles. However, Fabric's fabfile discovery algorithm only treats directories with an __init__.py file in them as legal Python packages. It refuse to load any directories with an __init__.pyc file only (without __init__.py) in them, which are also legal Python packages. Fabric's current fabfile discovery algorithm works well for most cases. But in some cases, for example, suppose someone would like to release a tool, which consist of several Fabric tasks, in such a format that it only contains *.pyc files, i.e. he/she does not want to release the source code at all. In such a case, users could run into trouble since Fabric refuse to load packages which only have an __init__.pyc in them. This commit gives Fabric the ability to load package fabfiles with __init__.pyc file only. This resolves fabric#1427.
oldsharp
added a commit
to oldsharp/fabric-fabric
that referenced
this issue
Dec 27, 2016
As the doc (sites/docs/usage/fabfiles.rst, in "Fabfile discovery") says, Fabric is capable of loading Python modules (e.g. fabfile.py) or packages (e.g. a fabfile/ directory containing an __init__.py). Starting from version 0.9.2, Fabric has been capable of loading package fabfiles. However, Fabric's fabfile discovery algorithm only treats directories with an __init__.py file in them as legal Python packages. It refuse to load any directories with an __init__.pyc file only (without __init__.py) in them, which are also legal Python packages. Fabric's current fabfile discovery algorithm works well for most cases. But in some cases, for example, suppose someone would like to release a tool, which consist of several Fabric tasks, in such a format that it only contains *.pyc files, i.e. he/she does not want to release the source code at all. In such a case, users could run into trouble since Fabric refuse to load packages which only have an __init__.pyc in them. This commit gives Fabric the ability to load package fabfiles with __init__.pyc file only. This resolves fabric#1427.
bitprophet
added a commit
that referenced
this issue
Apr 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fabric's fabfile discovery algorithm only treats directories with an
__init__.py
file in them as legal Python packages. It refuse to load any directories with an__init__.pyc
file only (without__init__.py
) in them , which are also legal Python packages.The text was updated successfully, but these errors were encountered: