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

Disable line number mapping. #32

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cinje/block/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def __call__(self, context):

yield Line(0, '')

if __debug__:
yield Line(0, '__mapping__ = [' + ','.join(str(i) for i in mapping) + ']')
#if __debug__:
# yield Line(0, '__mapping__ = [' + ','.join(str(i) for i in mapping) + ']')

yield Line(0, '__gzmapping__ = b"' + red(mapping).replace('"', '\"') + '"')
#yield Line(0, '__gzmapping__ = b"' + red(mapping).replace('"', '\"') + '"')

context.flag.remove('init')
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
import codecs

from setuptools import setup
from setuptools import setup, find_packages


if sys.version_info < (2, 7):
Expand Down Expand Up @@ -59,7 +59,7 @@
"Topic :: Utilities",
],

packages = ['cinje'],
packages = find_packages(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find_packages use has been deprecated? If this corrects the file ending issue that line number mapping triggers, there may be a larger issue?

Official documentation doesn't suggest using this function, which was an older Python 2 approach and theoretical way to "save time" back when it was most typical to have an executable setup.py script invoking setuptools. (See also: old-style namespaces which have a __init__.py files declaring the namespace. See this documentation for a complete description of "native namespace packages" v. "legacy namespace packages". That's also now just static project metadata.)

True, though, that packages should probably be: ['cinje', 'cinje.std', 'cinje.block', 'cinje.inline']

include_package_data = True,
package_data = {'': ['README.rst', 'LICENSE.txt']},
namespace_packages = [],
Expand Down
Loading