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

Fabric can't load package with *.pyc only #1427

Closed
oldsharp opened this issue Feb 4, 2016 · 0 comments
Closed

Fabric can't load package with *.pyc only #1427

oldsharp opened this issue Feb 4, 2016 · 0 comments

Comments

@oldsharp
Copy link

oldsharp commented Feb 4, 2016

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.

@oldsharp oldsharp changed the title Not Capable of Loading Package with Only "__init__.pyc" Inside It Fabric Can Not Load Package with *.pyc Only Feb 5, 2016
@oldsharp oldsharp changed the title Fabric Can Not Load Package with *.pyc Only Fabric can't load package with *.pyc only Dec 27, 2016
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant