Skip to content

Commit

Permalink
Renamed the packages_manager to package_control for backward
Browse files Browse the repository at this point in the history
compatibility.
  • Loading branch information
evandrocoan committed Feb 5, 2018
1 parent c6c4b0f commit 44d5034
Show file tree
Hide file tree
Showing 147 changed files with 53 additions and 53 deletions.
4 changes: 2 additions & 2 deletions 1_reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
mod_prefix = 'PackagesManager.' + mod_prefix
from imp import reload

# When reloading the package, we also need to reload the base "packages_manager"
# When reloading the package, we also need to reload the base "package_control"
# module in ST3. This flag inidicates we should re-add the PC package path
# to the beginning of sys.path before we try to reload.
do_insert = False
Expand Down Expand Up @@ -59,7 +59,7 @@
# to understand.
reload_mods = []
for mod in sys.modules:
if mod[0:15] in set(['packages_manager', 'PackagesManager']) and sys.modules[mod] is not None:
if mod[0:15] in set(['package_control', 'PackagesManager']) and sys.modules[mod] is not None:
reload_mods.append(mod)

mods_load_order = [
Expand Down
28 changes: 14 additions & 14 deletions 2_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@
os.remove(installed_file)

if sys.version_info < (3,):
from packages_manager.settings import add_package_control_on_change, disable_package_control_uninstaller
from packages_manager.bootstrap import bootstrap_dependency, mark_bootstrapped
from packages_manager.package_manager import PackageManager
from packages_manager import loader, text, sys_path
from package_control.settings import add_package_control_on_change, disable_package_control_uninstaller
from package_control.bootstrap import bootstrap_dependency, mark_bootstrapped
from package_control.package_manager import PackageManager
from package_control import loader, text, sys_path

else:
from .packages_manager.settings import add_package_control_on_change, disable_package_control_uninstaller
from .packages_manager.bootstrap import bootstrap_dependency, mark_bootstrapped
from .packages_manager.package_manager import PackageManager
from .packages_manager import loader, text, sys_path
from .package_control.settings import add_package_control_on_change, disable_package_control_uninstaller
from .package_control.bootstrap import bootstrap_dependency, mark_bootstrapped
from .package_control.package_manager import PackageManager
from .package_control import loader, text, sys_path


def _background_bootstrap(settings):
Expand All @@ -69,7 +69,7 @@ def _background_bootstrap(settings):
import os
from os.path import dirname
# This file adds the packages_manager subdirectory of PackagesManager
# This file adds the package_control subdirectory of PackagesManager
# to first in the sys.path so that all other packages may rely on
# PC for utility functions, such as event helpers, adding things to
# sys.path, downloading files from the internet, etc
Expand Down Expand Up @@ -130,7 +130,7 @@ def encode(path):
pc_package_path = buf.value
sys.path.insert(0, encode(pc_package_path))
import packages_manager
import package_control
# We remove the import path right away so as not to screw up
# Sublime Text and its import machinery
sys.path.remove(encode(pc_package_path))
Expand All @@ -140,7 +140,7 @@ def encode(path):
"""

base_loader_code = dedent(base_loader_code).lstrip()
loader.add_or_update('00', 'packages_manager', base_loader_code)
loader.add_or_update('00', 'package_control', base_loader_code)

# SSL support fo Linux
if sublime.platform() == 'linux' and int(sublime.version()) < 3109:
Expand Down Expand Up @@ -298,9 +298,9 @@ def uninstall_package_control():
return

try:
from PackagesManager.packages_manager.show_error import silence_error_message_box
from PackagesManager.packages_manager.package_manager import PackageManager
from PackagesManager.packages_manager.package_disabler import PackageDisabler
from PackagesManager.package_control.show_error import silence_error_message_box
from PackagesManager.package_control.package_manager import PackageManager
from PackagesManager.package_control.package_disabler import PackageDisabler

except ImportError as error:
print( "[2_bootstrap.py] uninstall_package_control, ImportError: %s" % error )
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PackagesManager is licensed under the MIT license.

All of the source code (except for `packages_manager/semver.py`), is under the
All of the source code (except for `package_control/semver.py`), is under the
license:

```
Expand All @@ -26,7 +26,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```

`packages_manager/semver.py` is under the license:
`package_control/semver.py` is under the license:

```
Copyright (c) 2013 Zachary King, FichteFoll
Expand Down
24 changes: 12 additions & 12 deletions PackagesManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


if st_version == 3:
from .packages_manager import text, sys_path
from .package_control import text, sys_path

installed_dir, _ = __name__.split('.')

Expand All @@ -17,7 +17,7 @@
has_unpacked = os.path.exists(pc_python_path)

elif st_version == 2:
from packages_manager import text, sys_path
from package_control import text, sys_path

installed_dir = os.path.basename(os.getcwd())

Expand Down Expand Up @@ -85,18 +85,18 @@
# Normal execution will finish setting up the package
else:
if st_version == 3:
from .packages_manager.commands import * # noqa
from .packages_manager.package_cleanup import PackageCleanup
from .packages_manager.unicode import tempfile_unicode_patch
from .packages_manager.console_write import console_write
from .packages_manager.settings import pc_settings_filename
from .package_control.commands import * # noqa
from .package_control.package_cleanup import PackageCleanup
from .package_control.unicode import tempfile_unicode_patch
from .package_control.console_write import console_write
from .package_control.settings import pc_settings_filename

else:
from packages_manager.commands import * # noqa
from packages_manager.package_cleanup import PackageCleanup
from packages_manager.unicode import tempfile_unicode_patch
from packages_manager.console_write import console_write
from packages_manager.settings import pc_settings_filename
from package_control.commands import * # noqa
from package_control.package_cleanup import PackageCleanup
from package_control.unicode import tempfile_unicode_patch
from package_control.console_write import console_write
from package_control.settings import pc_settings_filename

def plugin_loaded():
# Make sure the user's locale can handle non-ASCII. A whole bunch of
Expand Down
2 changes: 1 addition & 1 deletion dev/update_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
'version.py',
]

deps_path = os.path.join(os.path.dirname(__file__), '..', 'packages_manager', 'deps')
deps_path = os.path.join(os.path.dirname(__file__), '..', 'package_control', 'deps')

asn1crypto_dst = os.path.join(deps_path, 'asn1crypto')
oscrypto_dst = os.path.join(deps_path, 'oscrypto')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages_manager/ca_certs.py → package_control/ca_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import sublime
ca_bundle_dir = None
except (ImportError):
ca_bundle_dir = os.path.join(os.path.expanduser('~'), '.packages_manager')
ca_bundle_dir = os.path.join(os.path.expanduser('~'), '.package_control')


def get_ca_bundle_path(settings):
Expand Down Expand Up @@ -226,6 +226,6 @@ def ensure_ca_bundle_dir():
try:
os.mkdir(ca_bundle_dir)
except PermissionError:
ca_bundle_dir = '/var/tmp/packages_manager'
ca_bundle_dir = '/var/tmp/package_control'
if not os.path.exists(ca_bundle_dir):
os.mkdir(ca_bundle_dir)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .existing_packages_command import ExistingPackagesCommand


# print( "Reloading `PackagesManager\packages_manager\commands\list_packages_command.py`" )
# print( "Reloading `PackagesManager\package_control\commands\list_packages_command.py`" )

class ListPackagesCommand(sublime_plugin.WindowCommand):

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages_manager/loader.py → package_control/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ def _default_loader(name):

code = """
try:
from packages_manager import sys_path
from package_control import sys_path
except ImportError:
from PackagesManager.packages_manager import sys_path
from PackagesManager.package_control import sys_path
sys_path.add_dependency(%s)
""" % repr(name)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# when running ST3, the module will not yet be imported, and the cwd will not
# be Packages/PackagesManager/ so we need to patch it into sys.modules.
try:
from packages_manager import events
from package_control import events
except (ImportError):
events = None

Expand Down Expand Up @@ -73,7 +73,7 @@ def disable_packages(self, packages, type='upgrade'):
global events

if events is None:
from PackagesManager.packages_manager import events
from PackagesManager.package_control import events

if not isinstance(packages, list):
packages = [packages]
Expand Down Expand Up @@ -164,7 +164,7 @@ def reenable_package(self, package, type='upgrade'):
global events

if events is None:
from packages_manager import events
from package_control import events

settings = sublime.load_settings(preferences_filename())
ignored = load_list_setting(settings, 'ignored_packages')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def encode(path):
installed_packages_path = _possible_installed_packages_path

# When loaded as a .sublime-package file, the filename ends up being
# PackagesManager.sublime-package/PackagesManager.packages_manager.sys_path
# PackagesManager.sublime-package/PackagesManager.package_control.sys_path
else:
pc_package_path = dirname(dirname(__file__))
installed_packages_path = dirname(pc_package_path)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest

from packages_manager.clients.readme_client import ReadmeClient
from packages_manager.clients.github_client import GitHubClient
from packages_manager.clients.bitbucket_client import BitBucketClient
from packages_manager.http_cache import HttpCache
from package_control.clients.readme_client import ReadmeClient
from package_control.clients.github_client import GitHubClient
from package_control.clients.bitbucket_client import BitBucketClient
from package_control.http_cache import HttpCache

from . import LAST_COMMIT_TIMESTAMP, LAST_COMMIT_VERSION, CLIENT_ID, CLIENT_SECRET

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import unittest

from packages_manager.providers.repository_provider import RepositoryProvider
from packages_manager.providers.channel_provider import ChannelProvider
from packages_manager.providers.github_repository_provider import GitHubRepositoryProvider
from packages_manager.providers.github_user_provider import GitHubUserProvider
from packages_manager.providers.bitbucket_repository_provider import BitBucketRepositoryProvider
from packages_manager.http_cache import HttpCache
from package_control.providers.repository_provider import RepositoryProvider
from package_control.providers.channel_provider import ChannelProvider
from package_control.providers.github_repository_provider import GitHubRepositoryProvider
from package_control.providers.github_user_provider import GitHubUserProvider
from package_control.providers.bitbucket_repository_provider import BitBucketRepositoryProvider
from package_control.http_cache import HttpCache

from . import LAST_COMMIT_TIMESTAMP, LAST_COMMIT_VERSION, CLIENT_ID, CLIENT_SECRET

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ instead of the correct one, which would be `https://packagecontrol.io`.

PackagesManager is licensed under the MIT license.

All of the source code (except for `packages_manager/semver.py`), is under the
All of the source code (except for `package_control/semver.py`), is under the
license:

```
Expand All @@ -60,7 +60,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```

`packages_manager/semver.py` is under the license:
`package_control/semver.py` is under the license:

```
Copyright (c) 2013 Zachary King, FichteFoll
Expand Down
2 changes: 1 addition & 1 deletion unittesting.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"tests_dir" : "packages_manager/tests",
"tests_dir" : "package_control/tests",
"pattern" : "*tests.py",
"async": false,
"deferred": true,
Expand Down

0 comments on commit 44d5034

Please sign in to comment.