mirror of
https://github.com/b4tman/sync_ics2gcal
synced 2025-01-21 07:28:24 +00:00
Feature: setup (#15)
* add files for setup * ! package rename * move scripts * + setuptools_scm_git_archive * + fallback_version * + setuptools_scm_git_archive to setup.cfg * bdist_wheel universal * ignore build/ and .eggs/ * don't use version from setuptools_scm * Revert "don't use version from setuptools_scm" This reverts commit 7ad0b4d3d856e4f4d23ddb24209bfea6a2ac3f6d. * Revert "bdist_wheel universal" This reverts commit 5027866b3904f5765a1a0681c987f6b1f0431edb. * no-local-version * +workflow: Upload Python Package
This commit is contained in:
parent
fcba8f07ef
commit
a96050628a
1
.git_archival.txt
Normal file
1
.git_archival.txt
Normal file
@ -0,0 +1 @@
|
||||
ref-names: $Format:%D$
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
.git_archival.txt export-subst
|
26
.github/workflows/pythonpublish.yml
vendored
Normal file
26
.github/workflows/pythonpublish.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: Upload Python Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools setuptools_scm setuptools_scm_git_archive wheel twine
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_token }}
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload dist/*
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,3 +3,7 @@ service-account.json
|
||||
*.pyc
|
||||
my-test*.ics
|
||||
.vscode/*
|
||||
/dist/
|
||||
/*.egg-info/
|
||||
/build/
|
||||
/.eggs/
|
||||
|
7
MANIFEST.in
Normal file
7
MANIFEST.in
Normal file
@ -0,0 +1,7 @@
|
||||
include pyproject.toml
|
||||
|
||||
# Include the README
|
||||
include *.md
|
||||
|
||||
# Include the license file
|
||||
include LICENSE
|
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=40.8.0", "wheel", "setuptools_scm"]
|
||||
build-backend = "setuptools.build_meta"
|
7
setup.cfg
Normal file
7
setup.cfg
Normal file
@ -0,0 +1,7 @@
|
||||
[metadata]
|
||||
license_files = LICENSE
|
||||
|
||||
[options]
|
||||
setup_requires =
|
||||
setuptools_scm
|
||||
setuptools_scm_git_archive
|
44
setup.py
Normal file
44
setup.py
Normal file
@ -0,0 +1,44 @@
|
||||
import setuptools
|
||||
|
||||
with open('README.md', 'r') as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setuptools.setup(
|
||||
name='sync-ics2gcal',
|
||||
author='Dmitry Belyaev',
|
||||
author_email='b4tm4n@mail.ru',
|
||||
license='MIT',
|
||||
description='Sync ics file with Google calendar',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
url='https://github.com/b4tman/sync_ics2gcal',
|
||||
use_scm_version={
|
||||
'fallback_version': '0.1',
|
||||
'local_scheme': 'no-local-version'
|
||||
},
|
||||
setup_requires=['setuptools_scm', 'setuptools_scm_git_archive'],
|
||||
packages=setuptools.find_packages(exclude=['tests']),
|
||||
classifiers=[
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Operating System :: OS Independent',
|
||||
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
],
|
||||
python_requires='>=3.5',
|
||||
install_requires = [
|
||||
'google-auth>=1.5.0',
|
||||
'google-api-python-client>=1.7.0',
|
||||
'icalendar>=4.0.1',
|
||||
'pytz',
|
||||
'PyYAML>=3.13'
|
||||
],
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"sync-ics2gcal = sync_ics2gcal.sync_calendar:main",
|
||||
"manage-ics2gcal = sync_ics2gcal.manage_calendars:main",
|
||||
]
|
||||
}
|
||||
)
|
@ -5,7 +5,7 @@ import logging.config
|
||||
import yaml
|
||||
from pytz import utc
|
||||
|
||||
from gcal_sync import GoogleCalendar, GoogleCalendarService
|
||||
from . import GoogleCalendar, GoogleCalendarService
|
||||
|
||||
|
||||
def parse_args():
|
@ -4,14 +4,13 @@ import dateutil.parser
|
||||
import datetime
|
||||
import logging
|
||||
import logging.config
|
||||
from gcal_sync import (
|
||||
from . import (
|
||||
CalendarConverter,
|
||||
GoogleCalendarService,
|
||||
GoogleCalendar,
|
||||
CalendarSync
|
||||
)
|
||||
|
||||
|
||||
def load_config():
|
||||
with open('config.yml', 'r', encoding='utf-8') as f:
|
||||
result = yaml.safe_load(f)
|
@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from gcal_sync import CalendarConverter
|
||||
from sync_ics2gcal import CalendarConverter
|
||||
|
||||
uid = "UID:uisgtr8tre93wewe0yr8wqy@test.com"
|
||||
only_start_date = uid + """
|
||||
|
@ -8,7 +8,7 @@ import dateutil.parser
|
||||
import pytest
|
||||
from pytz import timezone, utc
|
||||
|
||||
from gcal_sync import CalendarSync
|
||||
from sync_ics2gcal import CalendarSync
|
||||
|
||||
|
||||
def sha1(string):
|
||||
|
Loading…
x
Reference in New Issue
Block a user