diff options
author | Kali Kaneko <kali@leap.se> | 2017-07-25 11:40:11 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-07-25 11:40:29 -0400 |
commit | 91e4481c450eb7eb928debc1cb7fa59bdb63dd7b (patch) | |
tree | 8fd7e6e77b6df669c33d96b7edad6db3cbe14dfe /service | |
parent | e4f755309d4cf5cfb6b0bcc62ed73d6070956ab5 (diff) |
[pkg] packaging and path changes
- move all the pixelated python package under src/
- move the pixelated_www package under the leap namespace
- allow to set globally the static folder
- add hours and minutes to the timestamp in package version, to allow
for several releases a day.
Diffstat (limited to 'service')
-rw-r--r-- | service/setup.py | 40 | ||||
-rw-r--r-- | service/src/pixelated/__init__.py (renamed from service/pixelated/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/account_recovery.py (renamed from service/pixelated/account_recovery.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/__init__.py (renamed from service/pixelated/adapter/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/listeners/__init__.py (renamed from service/pixelated/adapter/listeners/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/listeners/mailbox_indexer_listener.py (renamed from service/pixelated/adapter/listeners/mailbox_indexer_listener.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/mailstore/__init__.py (renamed from service/pixelated/adapter/mailstore/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/mailstore/body_parser.py (renamed from service/pixelated/adapter/mailstore/body_parser.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/mailstore/leap_attachment_store.py (renamed from service/pixelated/adapter/mailstore/leap_attachment_store.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/mailstore/leap_mailstore.py (renamed from service/pixelated/adapter/mailstore/leap_mailstore.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/mailstore/mailstore.py (renamed from service/pixelated/adapter/mailstore/mailstore.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/mailstore/maintenance/__init__.py (renamed from service/pixelated/adapter/mailstore/maintenance/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/mailstore/searchable_mailstore.py (renamed from service/pixelated/adapter/mailstore/searchable_mailstore.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/model/__init__.py (renamed from service/pixelated/adapter/model/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/model/mail.py (renamed from service/pixelated/adapter/model/mail.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/model/status.py (renamed from service/pixelated/adapter/model/status.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/model/tag.py (renamed from service/pixelated/adapter/model/tag.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/search/__init__.py (renamed from service/pixelated/adapter/search/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/search/contacts.py (renamed from service/pixelated/adapter/search/contacts.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/search/index_storage_key.py (renamed from service/pixelated/adapter/search/index_storage_key.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/services/__init__.py (renamed from service/pixelated/adapter/services/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/services/draft_service.py (renamed from service/pixelated/adapter/services/draft_service.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/services/feedback_service.py (renamed from service/pixelated/adapter/services/feedback_service.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/services/mail_sender.py (renamed from service/pixelated/adapter/services/mail_sender.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/services/mail_service.py (renamed from service/pixelated/adapter/services/mail_service.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/services/tag_service.py (renamed from service/pixelated/adapter/services/tag_service.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/adapter/welcome_mail.py (renamed from service/pixelated/adapter/welcome_mail.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/application.py (renamed from service/pixelated/application.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/assets/__init__.py (renamed from service/pixelated/assets/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/assets/recovery.mail.en-US (renamed from service/pixelated/assets/recovery.mail.en-US) | 0 | ||||
-rw-r--r-- | service/src/pixelated/assets/recovery.mail.pt-BR (renamed from service/pixelated/assets/recovery.mail.pt-BR) | 0 | ||||
-rw-r--r-- | service/src/pixelated/assets/welcome.mail.en-US (renamed from service/pixelated/assets/welcome.mail.en-US) | 0 | ||||
-rw-r--r-- | service/src/pixelated/assets/welcome.mail.pt-BR (renamed from service/pixelated/assets/welcome.mail.pt-BR) | 0 | ||||
-rw-r--r-- | service/src/pixelated/assets/welcome.mail.pt-BR.txt (renamed from service/pixelated/assets/welcome.mail.pt-BR.txt) | 0 | ||||
-rw-r--r-- | service/src/pixelated/authentication.py (renamed from service/pixelated/authentication.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/bitmask_libraries/__init__.py (renamed from service/pixelated/bitmask_libraries/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/bitmask_libraries/certs.py (renamed from service/pixelated/bitmask_libraries/certs.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/bitmask_libraries/keymanager.py (renamed from service/pixelated/bitmask_libraries/keymanager.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/bitmask_libraries/provider.py (renamed from service/pixelated/bitmask_libraries/provider.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/bitmask_libraries/smtp.py (renamed from service/pixelated/bitmask_libraries/smtp.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/certificates/__init__.py (renamed from service/pixelated/certificates/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/certificates/unstable.pixelated-project.org.ca.crt (renamed from service/pixelated/certificates/unstable.pixelated-project.org.ca.crt) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/__init__.py (renamed from service/pixelated/config/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/arguments.py (renamed from service/pixelated/config/arguments.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/credentials.py (renamed from service/pixelated/config/credentials.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/leap.py (renamed from service/pixelated/config/leap.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/leap_config.py (renamed from service/pixelated/config/leap_config.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/logger.py (renamed from service/pixelated/config/logger.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/services.py (renamed from service/pixelated/config/services.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/sessions.py (renamed from service/pixelated/config/sessions.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/config/site.py (renamed from service/pixelated/config/site.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/extensions/__init__.py (renamed from service/pixelated/extensions/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/extensions/esmtp_sender_factory.py (renamed from service/pixelated/extensions/esmtp_sender_factory.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/extensions/protobuf_socket.py (renamed from service/pixelated/extensions/protobuf_socket.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/extensions/requests_urllib3.py (renamed from service/pixelated/extensions/requests_urllib3.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/extensions/sqlcipher_wal.py (renamed from service/pixelated/extensions/sqlcipher_wal.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/maintenance.py (renamed from service/pixelated/maintenance.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/register.py (renamed from service/pixelated/register.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/__init__.py (renamed from service/pixelated/resources/__init__.py) | 17 | ||||
-rw-r--r-- | service/src/pixelated/resources/account_recovery_resource.py (renamed from service/pixelated/resources/account_recovery_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/attachments_resource.py (renamed from service/pixelated/resources/attachments_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/auth.py (renamed from service/pixelated/resources/auth.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/backup_account_resource.py (renamed from service/pixelated/resources/backup_account_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/contacts_resource.py (renamed from service/pixelated/resources/contacts_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/features_resource.py (renamed from service/pixelated/resources/features_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/feedback_resource.py (renamed from service/pixelated/resources/feedback_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/keys_resource.py (renamed from service/pixelated/resources/keys_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/login_resource.py (renamed from service/pixelated/resources/login_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/logout_resource.py (renamed from service/pixelated/resources/logout_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/mail_resource.py (renamed from service/pixelated/resources/mail_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/mails_resource.py (renamed from service/pixelated/resources/mails_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/root_resource.py (renamed from service/pixelated/resources/root_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/sandbox_resource.py (renamed from service/pixelated/resources/sandbox_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/session.py (renamed from service/pixelated/resources/session.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/tags_resource.py (renamed from service/pixelated/resources/tags_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/user_settings_resource.py (renamed from service/pixelated/resources/user_settings_resource.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/resources/users.py (renamed from service/pixelated/resources/users.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/__init__.py (renamed from service/pixelated/support/__init__.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/clock.py (renamed from service/pixelated/support/clock.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/date.py (renamed from service/pixelated/support/date.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/encrypted_file_storage.py (renamed from service/pixelated/support/encrypted_file_storage.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/error_handler.py (renamed from service/pixelated/support/error_handler.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/functional.py (renamed from service/pixelated/support/functional.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/language.py (renamed from service/pixelated/support/language.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/loglinegenerator.py (renamed from service/pixelated/support/loglinegenerator.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/mail_generator.py (renamed from service/pixelated/support/mail_generator.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/markov.py (renamed from service/pixelated/support/markov.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/replier.py (renamed from service/pixelated/support/replier.py) | 0 | ||||
-rw-r--r-- | service/src/pixelated/support/tls_adapter.py (renamed from service/pixelated/support/tls_adapter.py) | 0 |
89 files changed, 26 insertions, 31 deletions
diff --git a/service/setup.py b/service/setup.py index 09c21955..fa2e0c4b 100644 --- a/service/setup.py +++ b/service/setup.py @@ -18,47 +18,31 @@ import datetime import os -from setuptools import setup +from setuptools import setup, find_packages import time now = datetime.datetime.now() -timestamp = time.strftime('%Y%m%d', now.timetuple()) +timestamp = time.strftime('%Y%m%d%H%M', now.timetuple()) def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() +required = [ + 'requests', # TODO deprecate!!! + 'pyasn1', + 'whoosh', + 'twisted'] setup(name='leap.pixelated', - version='1,0beta2.%s' % timestamp, + version='1.0.%s' % timestamp, description='Twisted API with a RESTful service for the Pixelated front-end.', long_description=read('README.md'), author='LEAP Encryption Access Project', author_email='info@leap.se', url='https://github.com/leapcode/pixelated-user-agent', - packages=[ - 'pixelated', - 'pixelated.adapter', - 'pixelated.adapter.listeners', - 'pixelated.adapter.model', - 'pixelated.adapter.search', - 'pixelated.adapter.services', - 'pixelated.adapter.mailstore', - 'pixelated.adapter.mailstore.maintenance', - 'pixelated.bitmask_libraries', - 'pixelated.config', - 'pixelated.assets', - 'pixelated.certificates', - 'pixelated.support', - 'pixelated.resources', - 'pixelated.extensions' - ], - install_requires=[], - entry_points={ - 'console_scripts': [ - 'pixelated-user-agent = pixelated.application:initialize', - 'pixelated-maintenance = pixelated.maintenance:initialize', - 'pixelated-register = pixelated.register:initialize' - ] - }, + license='GNU Affero General Public License v3 or later (AGPLv3+)', + package_dir={'': 'src'}, + packages=find_packages('src'), + install_requires=required, include_package_data=True) diff --git a/service/pixelated/__init__.py b/service/src/pixelated/__init__.py index e69de29b..e69de29b 100644 --- a/service/pixelated/__init__.py +++ b/service/src/pixelated/__init__.py diff --git a/service/pixelated/account_recovery.py b/service/src/pixelated/account_recovery.py index 58242a7d..58242a7d 100644 --- a/service/pixelated/account_recovery.py +++ b/service/src/pixelated/account_recovery.py diff --git a/service/pixelated/adapter/__init__.py b/service/src/pixelated/adapter/__init__.py index 2756a319..2756a319 100644 --- a/service/pixelated/adapter/__init__.py +++ b/service/src/pixelated/adapter/__init__.py diff --git a/service/pixelated/adapter/listeners/__init__.py b/service/src/pixelated/adapter/listeners/__init__.py index 2756a319..2756a319 100644 --- a/service/pixelated/adapter/listeners/__init__.py +++ b/service/src/pixelated/adapter/listeners/__init__.py diff --git a/service/pixelated/adapter/listeners/mailbox_indexer_listener.py b/service/src/pixelated/adapter/listeners/mailbox_indexer_listener.py index 9cc522cf..9cc522cf 100644 --- a/service/pixelated/adapter/listeners/mailbox_indexer_listener.py +++ b/service/src/pixelated/adapter/listeners/mailbox_indexer_listener.py diff --git a/service/pixelated/adapter/mailstore/__init__.py b/service/src/pixelated/adapter/mailstore/__init__.py index 978df45d..978df45d 100644 --- a/service/pixelated/adapter/mailstore/__init__.py +++ b/service/src/pixelated/adapter/mailstore/__init__.py diff --git a/service/pixelated/adapter/mailstore/body_parser.py b/service/src/pixelated/adapter/mailstore/body_parser.py index 8cac75cf..8cac75cf 100644 --- a/service/pixelated/adapter/mailstore/body_parser.py +++ b/service/src/pixelated/adapter/mailstore/body_parser.py diff --git a/service/pixelated/adapter/mailstore/leap_attachment_store.py b/service/src/pixelated/adapter/mailstore/leap_attachment_store.py index b297f9e6..b297f9e6 100644 --- a/service/pixelated/adapter/mailstore/leap_attachment_store.py +++ b/service/src/pixelated/adapter/mailstore/leap_attachment_store.py diff --git a/service/pixelated/adapter/mailstore/leap_mailstore.py b/service/src/pixelated/adapter/mailstore/leap_mailstore.py index 288223dd..288223dd 100644 --- a/service/pixelated/adapter/mailstore/leap_mailstore.py +++ b/service/src/pixelated/adapter/mailstore/leap_mailstore.py diff --git a/service/pixelated/adapter/mailstore/mailstore.py b/service/src/pixelated/adapter/mailstore/mailstore.py index fbd7fc9e..fbd7fc9e 100644 --- a/service/pixelated/adapter/mailstore/mailstore.py +++ b/service/src/pixelated/adapter/mailstore/mailstore.py diff --git a/service/pixelated/adapter/mailstore/maintenance/__init__.py b/service/src/pixelated/adapter/mailstore/maintenance/__init__.py index 9a1007cc..9a1007cc 100644 --- a/service/pixelated/adapter/mailstore/maintenance/__init__.py +++ b/service/src/pixelated/adapter/mailstore/maintenance/__init__.py diff --git a/service/pixelated/adapter/mailstore/searchable_mailstore.py b/service/src/pixelated/adapter/mailstore/searchable_mailstore.py index 07e99ba7..07e99ba7 100644 --- a/service/pixelated/adapter/mailstore/searchable_mailstore.py +++ b/service/src/pixelated/adapter/mailstore/searchable_mailstore.py diff --git a/service/pixelated/adapter/model/__init__.py b/service/src/pixelated/adapter/model/__init__.py index 2756a319..2756a319 100644 --- a/service/pixelated/adapter/model/__init__.py +++ b/service/src/pixelated/adapter/model/__init__.py diff --git a/service/pixelated/adapter/model/mail.py b/service/src/pixelated/adapter/model/mail.py index b6a8beb0..b6a8beb0 100644 --- a/service/pixelated/adapter/model/mail.py +++ b/service/src/pixelated/adapter/model/mail.py diff --git a/service/pixelated/adapter/model/status.py b/service/src/pixelated/adapter/model/status.py index 5a11ee7b..5a11ee7b 100644 --- a/service/pixelated/adapter/model/status.py +++ b/service/src/pixelated/adapter/model/status.py diff --git a/service/pixelated/adapter/model/tag.py b/service/src/pixelated/adapter/model/tag.py index ca62a1fe..ca62a1fe 100644 --- a/service/pixelated/adapter/model/tag.py +++ b/service/src/pixelated/adapter/model/tag.py diff --git a/service/pixelated/adapter/search/__init__.py b/service/src/pixelated/adapter/search/__init__.py index e7a4e8c6..e7a4e8c6 100644 --- a/service/pixelated/adapter/search/__init__.py +++ b/service/src/pixelated/adapter/search/__init__.py diff --git a/service/pixelated/adapter/search/contacts.py b/service/src/pixelated/adapter/search/contacts.py index 733489b0..733489b0 100644 --- a/service/pixelated/adapter/search/contacts.py +++ b/service/src/pixelated/adapter/search/contacts.py diff --git a/service/pixelated/adapter/search/index_storage_key.py b/service/src/pixelated/adapter/search/index_storage_key.py index b2761849..b2761849 100644 --- a/service/pixelated/adapter/search/index_storage_key.py +++ b/service/src/pixelated/adapter/search/index_storage_key.py diff --git a/service/pixelated/adapter/services/__init__.py b/service/src/pixelated/adapter/services/__init__.py index 2756a319..2756a319 100644 --- a/service/pixelated/adapter/services/__init__.py +++ b/service/src/pixelated/adapter/services/__init__.py diff --git a/service/pixelated/adapter/services/draft_service.py b/service/src/pixelated/adapter/services/draft_service.py index 504d92db..504d92db 100644 --- a/service/pixelated/adapter/services/draft_service.py +++ b/service/src/pixelated/adapter/services/draft_service.py diff --git a/service/pixelated/adapter/services/feedback_service.py b/service/src/pixelated/adapter/services/feedback_service.py index 0cc595eb..0cc595eb 100644 --- a/service/pixelated/adapter/services/feedback_service.py +++ b/service/src/pixelated/adapter/services/feedback_service.py diff --git a/service/pixelated/adapter/services/mail_sender.py b/service/src/pixelated/adapter/services/mail_sender.py index 063ea156..063ea156 100644 --- a/service/pixelated/adapter/services/mail_sender.py +++ b/service/src/pixelated/adapter/services/mail_sender.py diff --git a/service/pixelated/adapter/services/mail_service.py b/service/src/pixelated/adapter/services/mail_service.py index e5343997..e5343997 100644 --- a/service/pixelated/adapter/services/mail_service.py +++ b/service/src/pixelated/adapter/services/mail_service.py diff --git a/service/pixelated/adapter/services/tag_service.py b/service/src/pixelated/adapter/services/tag_service.py index c51da625..c51da625 100644 --- a/service/pixelated/adapter/services/tag_service.py +++ b/service/src/pixelated/adapter/services/tag_service.py diff --git a/service/pixelated/adapter/welcome_mail.py b/service/src/pixelated/adapter/welcome_mail.py index 8d3cdd7a..8d3cdd7a 100644 --- a/service/pixelated/adapter/welcome_mail.py +++ b/service/src/pixelated/adapter/welcome_mail.py diff --git a/service/pixelated/application.py b/service/src/pixelated/application.py index ef99d47c..ef99d47c 100644 --- a/service/pixelated/application.py +++ b/service/src/pixelated/application.py diff --git a/service/pixelated/assets/__init__.py b/service/src/pixelated/assets/__init__.py index e69de29b..e69de29b 100644 --- a/service/pixelated/assets/__init__.py +++ b/service/src/pixelated/assets/__init__.py diff --git a/service/pixelated/assets/recovery.mail.en-US b/service/src/pixelated/assets/recovery.mail.en-US index e7a09f1b..e7a09f1b 100644 --- a/service/pixelated/assets/recovery.mail.en-US +++ b/service/src/pixelated/assets/recovery.mail.en-US diff --git a/service/pixelated/assets/recovery.mail.pt-BR b/service/src/pixelated/assets/recovery.mail.pt-BR index 558c6905..558c6905 100644 --- a/service/pixelated/assets/recovery.mail.pt-BR +++ b/service/src/pixelated/assets/recovery.mail.pt-BR diff --git a/service/pixelated/assets/welcome.mail.en-US b/service/src/pixelated/assets/welcome.mail.en-US index 34d30812..34d30812 100644 --- a/service/pixelated/assets/welcome.mail.en-US +++ b/service/src/pixelated/assets/welcome.mail.en-US diff --git a/service/pixelated/assets/welcome.mail.pt-BR b/service/src/pixelated/assets/welcome.mail.pt-BR index e57405d2..e57405d2 100644 --- a/service/pixelated/assets/welcome.mail.pt-BR +++ b/service/src/pixelated/assets/welcome.mail.pt-BR diff --git a/service/pixelated/assets/welcome.mail.pt-BR.txt b/service/src/pixelated/assets/welcome.mail.pt-BR.txt index 810d31a6..810d31a6 100644 --- a/service/pixelated/assets/welcome.mail.pt-BR.txt +++ b/service/src/pixelated/assets/welcome.mail.pt-BR.txt diff --git a/service/pixelated/authentication.py b/service/src/pixelated/authentication.py index b5edbec0..b5edbec0 100644 --- a/service/pixelated/authentication.py +++ b/service/src/pixelated/authentication.py diff --git a/service/pixelated/bitmask_libraries/__init__.py b/service/src/pixelated/bitmask_libraries/__init__.py index e69de29b..e69de29b 100644 --- a/service/pixelated/bitmask_libraries/__init__.py +++ b/service/src/pixelated/bitmask_libraries/__init__.py diff --git a/service/pixelated/bitmask_libraries/certs.py b/service/src/pixelated/bitmask_libraries/certs.py index 9a76a01d..9a76a01d 100644 --- a/service/pixelated/bitmask_libraries/certs.py +++ b/service/src/pixelated/bitmask_libraries/certs.py diff --git a/service/pixelated/bitmask_libraries/keymanager.py b/service/src/pixelated/bitmask_libraries/keymanager.py index 9a1b730e..9a1b730e 100644 --- a/service/pixelated/bitmask_libraries/keymanager.py +++ b/service/src/pixelated/bitmask_libraries/keymanager.py diff --git a/service/pixelated/bitmask_libraries/provider.py b/service/src/pixelated/bitmask_libraries/provider.py index 96935fbc..96935fbc 100644 --- a/service/pixelated/bitmask_libraries/provider.py +++ b/service/src/pixelated/bitmask_libraries/provider.py diff --git a/service/pixelated/bitmask_libraries/smtp.py b/service/src/pixelated/bitmask_libraries/smtp.py index 643d4d4a..643d4d4a 100644 --- a/service/pixelated/bitmask_libraries/smtp.py +++ b/service/src/pixelated/bitmask_libraries/smtp.py diff --git a/service/pixelated/certificates/__init__.py b/service/src/pixelated/certificates/__init__.py index e69de29b..e69de29b 100644 --- a/service/pixelated/certificates/__init__.py +++ b/service/src/pixelated/certificates/__init__.py diff --git a/service/pixelated/certificates/unstable.pixelated-project.org.ca.crt b/service/src/pixelated/certificates/unstable.pixelated-project.org.ca.crt index 22ccb662..22ccb662 100644 --- a/service/pixelated/certificates/unstable.pixelated-project.org.ca.crt +++ b/service/src/pixelated/certificates/unstable.pixelated-project.org.ca.crt diff --git a/service/pixelated/config/__init__.py b/service/src/pixelated/config/__init__.py index e69de29b..e69de29b 100644 --- a/service/pixelated/config/__init__.py +++ b/service/src/pixelated/config/__init__.py diff --git a/service/pixelated/config/arguments.py b/service/src/pixelated/config/arguments.py index 01152a34..01152a34 100644 --- a/service/pixelated/config/arguments.py +++ b/service/src/pixelated/config/arguments.py diff --git a/service/pixelated/config/credentials.py b/service/src/pixelated/config/credentials.py index 89901b3f..89901b3f 100644 --- a/service/pixelated/config/credentials.py +++ b/service/src/pixelated/config/credentials.py diff --git a/service/pixelated/config/leap.py b/service/src/pixelated/config/leap.py index 2b3a242a..2b3a242a 100644 --- a/service/pixelated/config/leap.py +++ b/service/src/pixelated/config/leap.py diff --git a/service/pixelated/config/leap_config.py b/service/src/pixelated/config/leap_config.py index 7319d82b..7319d82b 100644 --- a/service/pixelated/config/leap_config.py +++ b/service/src/pixelated/config/leap_config.py diff --git a/service/pixelated/config/logger.py b/service/src/pixelated/config/logger.py index bc4ab8d4..bc4ab8d4 100644 --- a/service/pixelated/config/logger.py +++ b/service/src/pixelated/config/logger.py diff --git a/service/pixelated/config/services.py b/service/src/pixelated/config/services.py index 48c1a528..48c1a528 100644 --- a/service/pixelated/config/services.py +++ b/service/src/pixelated/config/services.py diff --git a/service/pixelated/config/sessions.py b/service/src/pixelated/config/sessions.py index 594b8e35..594b8e35 100644 --- a/service/pixelated/config/sessions.py +++ b/service/src/pixelated/config/sessions.py diff --git a/service/pixelated/config/site.py b/service/src/pixelated/config/site.py index 96554584..96554584 100644 --- a/service/pixelated/config/site.py +++ b/service/src/pixelated/config/site.py diff --git a/service/pixelated/extensions/__init__.py b/service/src/pixelated/extensions/__init__.py index e69de29b..e69de29b 100644 --- a/service/pixelated/extensions/__init__.py +++ b/service/src/pixelated/extensions/__init__.py diff --git a/service/pixelated/extensions/esmtp_sender_factory.py b/service/src/pixelated/extensions/esmtp_sender_factory.py index 59aa90c8..59aa90c8 100644 --- a/service/pixelated/extensions/esmtp_sender_factory.py +++ b/service/src/pixelated/extensions/esmtp_sender_factory.py diff --git a/service/pixelated/extensions/protobuf_socket.py b/service/src/pixelated/extensions/protobuf_socket.py index 548f5fd6..548f5fd6 100644 --- a/service/pixelated/extensions/protobuf_socket.py +++ b/service/src/pixelated/extensions/protobuf_socket.py diff --git a/service/pixelated/extensions/requests_urllib3.py b/service/src/pixelated/extensions/requests_urllib3.py index c4ec2438..c4ec2438 100644 --- a/service/pixelated/extensions/requests_urllib3.py +++ b/service/src/pixelated/extensions/requests_urllib3.py diff --git a/service/pixelated/extensions/sqlcipher_wal.py b/service/src/pixelated/extensions/sqlcipher_wal.py index 776087bf..776087bf 100644 --- a/service/pixelated/extensions/sqlcipher_wal.py +++ b/service/src/pixelated/extensions/sqlcipher_wal.py diff --git a/service/pixelated/maintenance.py b/service/src/pixelated/maintenance.py index a2286034..a2286034 100644 --- a/service/pixelated/maintenance.py +++ b/service/src/pixelated/maintenance.py diff --git a/service/pixelated/register.py b/service/src/pixelated/register.py index b6faf454..b6faf454 100644 --- a/service/pixelated/register.py +++ b/service/src/pixelated/register.py diff --git a/service/pixelated/resources/__init__.py b/service/src/pixelated/resources/__init__.py index 9dae4a61..58b56786 100644 --- a/service/pixelated/resources/__init__.py +++ b/service/src/pixelated/resources/__init__.py @@ -28,6 +28,9 @@ from twisted.web.http import INTERNAL_SERVER_ERROR, SERVICE_UNAVAILABLE log = Logger() +STATIC = None + + class SetEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, set): @@ -57,6 +60,11 @@ def handle_error_deferred(e, request): request.finish() +def set_static_folder(static_folder): + global STATIC + STATIC = static_folder + + def get_protected_static_folder(static_folder=None): static = static_folder or _get_static_folder() return os.path.join(static, 'protected') @@ -68,9 +76,12 @@ def get_public_static_folder(static_folder=None): def _get_static_folder(): - static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "..", "web-ui", "dist")) - if not os.path.exists(static_folder): - static_folder = os.path.join('/', 'usr', 'share', 'pixelated-user-agent') + if not STATIC: + static_folder = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "..", "web-ui", "dist")) + if not os.path.exists(static_folder): + static_folder = os.path.join('/', 'usr', 'share', 'pixelated-user-agent') + else: + static_folder = STATIC return static_folder diff --git a/service/pixelated/resources/account_recovery_resource.py b/service/src/pixelated/resources/account_recovery_resource.py index 209a7693..209a7693 100644 --- a/service/pixelated/resources/account_recovery_resource.py +++ b/service/src/pixelated/resources/account_recovery_resource.py diff --git a/service/pixelated/resources/attachments_resource.py b/service/src/pixelated/resources/attachments_resource.py index 1081b4b8..1081b4b8 100644 --- a/service/pixelated/resources/attachments_resource.py +++ b/service/src/pixelated/resources/attachments_resource.py diff --git a/service/pixelated/resources/auth.py b/service/src/pixelated/resources/auth.py index adac985f..adac985f 100644 --- a/service/pixelated/resources/auth.py +++ b/service/src/pixelated/resources/auth.py diff --git a/service/pixelated/resources/backup_account_resource.py b/service/src/pixelated/resources/backup_account_resource.py index 94129122..94129122 100644 --- a/service/pixelated/resources/backup_account_resource.py +++ b/service/src/pixelated/resources/backup_account_resource.py diff --git a/service/pixelated/resources/contacts_resource.py b/service/src/pixelated/resources/contacts_resource.py index dc17d1ac..dc17d1ac 100644 --- a/service/pixelated/resources/contacts_resource.py +++ b/service/src/pixelated/resources/contacts_resource.py diff --git a/service/pixelated/resources/features_resource.py b/service/src/pixelated/resources/features_resource.py index c1b61f12..c1b61f12 100644 --- a/service/pixelated/resources/features_resource.py +++ b/service/src/pixelated/resources/features_resource.py diff --git a/service/pixelated/resources/feedback_resource.py b/service/src/pixelated/resources/feedback_resource.py index aeead401..aeead401 100644 --- a/service/pixelated/resources/feedback_resource.py +++ b/service/src/pixelated/resources/feedback_resource.py diff --git a/service/pixelated/resources/keys_resource.py b/service/src/pixelated/resources/keys_resource.py index 091c27d0..091c27d0 100644 --- a/service/pixelated/resources/keys_resource.py +++ b/service/src/pixelated/resources/keys_resource.py diff --git a/service/pixelated/resources/login_resource.py b/service/src/pixelated/resources/login_resource.py index 5b0b70d0..5b0b70d0 100644 --- a/service/pixelated/resources/login_resource.py +++ b/service/src/pixelated/resources/login_resource.py diff --git a/service/pixelated/resources/logout_resource.py b/service/src/pixelated/resources/logout_resource.py index a4fe584f..a4fe584f 100644 --- a/service/pixelated/resources/logout_resource.py +++ b/service/src/pixelated/resources/logout_resource.py diff --git a/service/pixelated/resources/mail_resource.py b/service/src/pixelated/resources/mail_resource.py index e1ba6087..e1ba6087 100644 --- a/service/pixelated/resources/mail_resource.py +++ b/service/src/pixelated/resources/mail_resource.py diff --git a/service/pixelated/resources/mails_resource.py b/service/src/pixelated/resources/mails_resource.py index d911e0d2..d911e0d2 100644 --- a/service/pixelated/resources/mails_resource.py +++ b/service/src/pixelated/resources/mails_resource.py diff --git a/service/pixelated/resources/root_resource.py b/service/src/pixelated/resources/root_resource.py index b014a590..b014a590 100644 --- a/service/pixelated/resources/root_resource.py +++ b/service/src/pixelated/resources/root_resource.py diff --git a/service/pixelated/resources/sandbox_resource.py b/service/src/pixelated/resources/sandbox_resource.py index 35f99774..35f99774 100644 --- a/service/pixelated/resources/sandbox_resource.py +++ b/service/src/pixelated/resources/sandbox_resource.py diff --git a/service/pixelated/resources/session.py b/service/src/pixelated/resources/session.py index 5dfa52e6..5dfa52e6 100644 --- a/service/pixelated/resources/session.py +++ b/service/src/pixelated/resources/session.py diff --git a/service/pixelated/resources/tags_resource.py b/service/src/pixelated/resources/tags_resource.py index 4cea4ca7..4cea4ca7 100644 --- a/service/pixelated/resources/tags_resource.py +++ b/service/src/pixelated/resources/tags_resource.py diff --git a/service/pixelated/resources/user_settings_resource.py b/service/src/pixelated/resources/user_settings_resource.py index 04b434bd..04b434bd 100644 --- a/service/pixelated/resources/user_settings_resource.py +++ b/service/src/pixelated/resources/user_settings_resource.py diff --git a/service/pixelated/resources/users.py b/service/src/pixelated/resources/users.py index a3e6118e..a3e6118e 100644 --- a/service/pixelated/resources/users.py +++ b/service/src/pixelated/resources/users.py diff --git a/service/pixelated/support/__init__.py b/service/src/pixelated/support/__init__.py index 0685f48d..0685f48d 100644 --- a/service/pixelated/support/__init__.py +++ b/service/src/pixelated/support/__init__.py diff --git a/service/pixelated/support/clock.py b/service/src/pixelated/support/clock.py index 9cab8857..9cab8857 100644 --- a/service/pixelated/support/clock.py +++ b/service/src/pixelated/support/clock.py diff --git a/service/pixelated/support/date.py b/service/src/pixelated/support/date.py index 0012aeea..0012aeea 100644 --- a/service/pixelated/support/date.py +++ b/service/src/pixelated/support/date.py diff --git a/service/pixelated/support/encrypted_file_storage.py b/service/src/pixelated/support/encrypted_file_storage.py index a1dbffa8..a1dbffa8 100644 --- a/service/pixelated/support/encrypted_file_storage.py +++ b/service/src/pixelated/support/encrypted_file_storage.py diff --git a/service/pixelated/support/error_handler.py b/service/src/pixelated/support/error_handler.py index 1a0e1a11..1a0e1a11 100644 --- a/service/pixelated/support/error_handler.py +++ b/service/src/pixelated/support/error_handler.py diff --git a/service/pixelated/support/functional.py b/service/src/pixelated/support/functional.py index 2e293625..2e293625 100644 --- a/service/pixelated/support/functional.py +++ b/service/src/pixelated/support/functional.py diff --git a/service/pixelated/support/language.py b/service/src/pixelated/support/language.py index cd455f89..cd455f89 100644 --- a/service/pixelated/support/language.py +++ b/service/src/pixelated/support/language.py diff --git a/service/pixelated/support/loglinegenerator.py b/service/src/pixelated/support/loglinegenerator.py index d8a8fd5b..d8a8fd5b 100644 --- a/service/pixelated/support/loglinegenerator.py +++ b/service/src/pixelated/support/loglinegenerator.py diff --git a/service/pixelated/support/mail_generator.py b/service/src/pixelated/support/mail_generator.py index e5232370..e5232370 100644 --- a/service/pixelated/support/mail_generator.py +++ b/service/src/pixelated/support/mail_generator.py diff --git a/service/pixelated/support/markov.py b/service/src/pixelated/support/markov.py index 8f7c0ef3..8f7c0ef3 100644 --- a/service/pixelated/support/markov.py +++ b/service/src/pixelated/support/markov.py diff --git a/service/pixelated/support/replier.py b/service/src/pixelated/support/replier.py index bab23179..bab23179 100644 --- a/service/pixelated/support/replier.py +++ b/service/src/pixelated/support/replier.py diff --git a/service/pixelated/support/tls_adapter.py b/service/src/pixelated/support/tls_adapter.py index 301a2123..301a2123 100644 --- a/service/pixelated/support/tls_adapter.py +++ b/service/src/pixelated/support/tls_adapter.py |